function AdfTableDataFetchEvent(a,b,d,e,f){this.Init(a,b,d,e,f)}AdfObject.createSubclass(AdfTableDataFetchEvent,AdfComponentEvent);AdfTableDataFetchEvent.FETCH_EVENT_TYPE="fetch";AdfTableDataFetchEvent.prototype.Init=function(a,b,d,e,f){AdfTableDataFetchEvent.superclass.Init.call(this,a,AdfTableDataFetchEvent.FETCH_EVENT_TYPE);this._id=b;this._index=e;this._clientKey=f;this._subtype=d;this._renderOnly=!1;this.setRoot(a)}; AdfTableDataFetchEvent.prototype.setClientTokens=function(a){this._clientTokens=a};AdfTableDataFetchEvent.prototype.setOldClientKey=function(a){this._oldClientKey=a};AdfTableDataFetchEvent.prototype.setColumnClientId=function(a){this._columnClientId=a};AdfTableDataFetchEvent.prototype.setOldColumnClientId=function(a){this._oldColumnClientId=a};AdfTableDataFetchEvent.prototype.setFillRows=function(a){this._fillRows=a}; AdfTableDataFetchEvent.prototype.setLastClientKey=function(a){this._lastClientKey=a};AdfTableDataFetchEvent.prototype.setActivatePreviousCell=function(){this._activatePreviousCell=!0};AdfTableDataFetchEvent.prototype.setRenderOnly=function(a){this._renderOnly=a}; AdfTableDataFetchEvent.prototype.AddMarshalledProperties=function(a){AdfTableDataFetchEvent.superclass.AddMarshalledProperties.call(this,a);a.id=this._id;a.subtype=this._subtype;void 0!=this._index&&(a.index=this._index);this._clientKey&&(a.clientKey=this._clientKey);this._clientTokens&&(a.clientTokens=this._clientTokens);this._oldClientKey&&(a.oldClientKey=this._oldClientKey);this._renderOnly&&(a.renderOnly=!0);this._fillRows&&(a.fillRows=this._fillRows);this._lastClientKey&&(a.lastClientKey=this._lastClientKey); this._columnClientId&&(a.columnClientId=this._columnClientId);this._oldColumnClientId&&(a.oldColumnClientId=this._oldColumnClientId);this._activatePreviousCell&&(a.activatePreviousCell=this._activatePreviousCell)};AdfTableDataFetchEvent.prototype.getClearMessages=function(){return!1};AdfTableDataFetchEvent.prototype.propagatesToServer=function(){return!0}; AdfTableDataFetchEvent.prototype.isValidationNeeded=function(){return this._subtype==AdfTableDataFetchEvent.INITIAL_SUBTYPE||this._subtype==AdfTableDataFetchEvent.EXPAND_SUBTYPE||this._subtype==AdfTableDataFetchEvent.COLLAPSE_SUBTYPE?!1:!0};AdfTableDataFetchEvent.INITIAL_SUBTYPE=0;AdfTableDataFetchEvent.BEFORE_KEY_SUBTYPE=1;AdfTableDataFetchEvent.AFTER_KEY_SUBTYPE=2;AdfTableDataFetchEvent.FROM_INDEX_SUBTYPE=3;AdfTableDataFetchEvent.UP_TO_INDEX_SUBTYPE=4;AdfTableDataFetchEvent.EXPAND_SUBTYPE=5; AdfTableDataFetchEvent.COLLAPSE_SUBTYPE=6;AdfTableDataFetchEvent.CLICK_EDIT_ACTIVE_ROW=7;AdfTableDataFetchEvent.AUTO_PPR=8; function AdfRangeChangeEvent(a,b,d,e,f){this.Init(a,b,d,e,f)}AdfObject.createSubclass(AdfRangeChangeEvent,AdfComponentEvent);AdfRangeChangeEvent.prototype.Init=function(a,b,d,e,f){AdfAssert.assertPrototype(a,AdfUIComponent);this._oldStart=b;this._oldEnd=d;this._newStart=e;this._newEnd=f;this.setRoot(a);this.setPartial(!0);AdfRangeChangeEvent.superclass.Init.call(this,a,"rangeChange")}; AdfRangeChangeEvent.prototype.AddMarshalledProperties=function(a){a.oldStart=this._oldStart;a.oldEnd=this._oldEnd;a.newStart=this._newStart;a.newEnd=this._newEnd};AdfRangeChangeEvent.prototype.propagatesToServer=function(){return!0};AdfRangeChangeEvent.prototype.isValidationNeeded=function(){return!0};AdfRangeChangeEvent.prototype.isImmediate=function(){return this.getSource().getImmediate()};AdfRangeChangeEvent.queue=function(a,b,d,e,f){(new AdfRangeChangeEvent(a,b,d,e,f)).queue(!0)}; function AdfTableShowColumnsEvent(a,b,d){this.Init(a,b,d)}AdfObject.createSubclass(AdfTableShowColumnsEvent,AdfComponentEvent);AdfTableShowColumnsEvent.SHOW_COLUMN_EVENT_TYPE="showColumns";AdfTableShowColumnsEvent.prototype.Init=function(a,b,d){AdfTableShowColumnsEvent.superclass.Init.call(this,a,AdfTableShowColumnsEvent.SHOW_COLUMN_EVENT_TYPE);this._columnIds=b;this._showType=d;this.setPartial(!0);this.setRoot(a)};AdfTableShowColumnsEvent.prototype.getShowType=function(){return this._showType}; AdfTableShowColumnsEvent.prototype.setTargetColumnId=function(a){this._targetColumnId=a};AdfTableShowColumnsEvent.prototype.setAfterTarget=function(a){this._afterTarget=a};AdfTableShowColumnsEvent.prototype.AddMarshalledProperties=function(a){AdfTableShowColumnsEvent.superclass.AddMarshalledProperties.call(this,a);this._columnIds&&(a.columnIds=this._columnIds);a.showType=this._showType;this._targetColumnId&&(a.targetColumnId=this._targetColumnId);this._afterTarget&&(a.afterTarget=this._afterTarget)}; AdfTableShowColumnsEvent.prototype.propagatesToServer=function(){return!0};AdfTableShowColumnsEvent.prototype.isValidationNeeded=function(){return!0}; AdfUIComponents.createComponentClass("AdfRichTable",{componentType:"oracle.adf.RichTable",propertyKeys:[{name:"inlineStyle",type:"String"},{name:"styleClass",type:"String"},{name:"shortDesc",type:"String"},{name:"unsecure",type:"Object",secured:!0},{name:"visible",type:"Boolean","default":!0},{name:"columnSelection",type:"String","default":"none"},{name:"horizontalGridVisible",type:"Boolean","default":!0},{name:"verticalGridVisible",type:"Boolean","default":!0},{name:"emptyText",type:"String"},{name:"columnBandingInterval", type:"Number","default":0},{name:"rowBandingInterval",type:"Number","default":1},{name:"summary",type:"String"},{name:"clearTokenCacheOnPPR",type:"Boolean","default":!0},{name:"selectionEventDelay",type:"String","default":"disabled"},{name:"freezeDirection",type:"String","default":"start"},{name:"bodyContextMenuId",type:"String"},{name:"columnStretching",type:"String","default":"none"},{name:"columnResizing",type:"String","default":"enabled"},{name:"contextMenuId",type:"String"},{name:"displayRow", type:"String","default":"first"},"displayRowKey",{name:"disableColumnReordering",type:"Boolean","default":!1},{name:"width",type:"String"},{name:"scrollTop",type:"Number","default":0},{name:"scrollLeft",type:"Number","default":0},"scrollTopRowKey",{name:"contentDelivery",type:"String","default":"whenAvailable"},{name:"fetchSize",type:"Number","default":25},"activeRowKey",{name:"rowSelection",type:"String","default":"none"},{name:"contextMenuSelect",type:"Boolean","default":!0},{name:"editingMode", type:"String","default":"editAll"},{name:"autoHeightRows",type:"Number","default":-1},{name:"scrollPolicy",type:"String","default":"auto"},{name:"blockRowNavigationOnError",type:"String","default":"auto"},{name:"maxClientRows",type:"Number","default":500},{name:"persist",type:"Array"},{name:"dontPersist",type:"Array"},{name:"allDetailsEnabled",type:"Boolean","default":!1},{name:"filterVisible",type:"Boolean","default":!1},"columnSelectionListener",{name:"rows",type:"Number","default":25},{name:"first", type:"Number","default":0}],eventNames:["columnSelection"],namingContainer:!0,superclass:AdfUITable2}); AdfRichTable.prototype.getAccessibleName=function(){return this.getShortDesc()};AdfRichTable.prototype.scrollColumnIntoView=function(a){this.getPeer().scrollColumnIntoView(a)};AdfRichTable.prototype.getRowIndex=function(a){return this.getPeer().getRowIndex(a)};AdfRichTable.prototype.getRowKey=function(a){return this.getPeer().getRowKey(a)};AdfRichTable.prototype.isEmpty=function(){return null==this.getRowKey(this.getFirst())}; AdfRichTable.prototype.scrollToRowIndex=function(a,b){this.getPeer().scrollToRowIndex(a,b)};AdfRichTable.prototype.getClientStartRowIndex=function(){return this.getPeer().getClientStartRowIndex()};AdfRichTable.prototype.getClientRowCount=function(){return this.getPeer().getClientRowCount()};AdfRichTable.prototype.getRowCount=function(){return this.getPeer().GetRowCount()};AdfRichTable.prototype.simulateSelectRows=function(a,b){this.getPeer().simulateSelectRows(a,b)}; AdfRichTable.prototype.preventSwitchToEditableMode=function(){return this.getPeer().preventSwitchToEditableMode()}; AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlTableBasePeer",!1); AdfDhtmlTableBasePeer.InitSubclass=function(){AdfRichUIPeer.addDomEventHandlers(this,AdfDhtmlLookAndFeel.SCROLL_EVENT_TYPE,AdfDhtmlLookAndFeel.KEY_DOWN_EVENT_TYPE,AdfDhtmlLookAndFeel.MOUSE_MOVE_EVENT_TYPE);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.CLICK_EVENT_TYPE,AdfUIInputEvent.MOUSE_DOWN_EVENT_TYPE,AdfUIInputEvent.MOUSE_UP_EVENT_TYPE,AdfUIInputEvent.KEY_DOWN_EVENT_TYPE,AdfUIInputEvent.KEY_UP_EVENT_TYPE,AdfComponentEvent.FOCUS_EVENT_TYPE,AdfComponentEvent.BLUR_EVENT_TYPE,AdfUIInputEvent.DOUBLE_CLICK_EVENT_TYPE, AdfComponentEvent.CONTEXT_MENU_EVENT_TYPE,AdfValueChangeEvent.VALUE_CHANGE_TYPE);AdfRichUIPeer.addComponentPropertyChanges(this,"selectedRowKeys","disclosedRowKeys","scrollTop","scrollLeft","activeRowKey");AdfRichUIPeer.addSuppressedPPRAttributes(this,"first");AdfRichUIPeer.addSuppressedPPRAttributes(this,"rows");AdfRichUIPeer.addSuppressedPPRAttributes(this,"scrollTop");AdfRichUIPeer.addSuppressedPPRAttributes(this,"scrollLeft");AdfRichUIPeer.addSuppressedPPRAttributes(this,"scrollTopRowKey");AdfRichUIPeer.addSuppressedPPRAttributes(this, "activeRowKey");this._SEL_UPDATE_ALL_SELECT=0;this._SEL_UPDATE_ALL_UNSELECT=1;this._SEL_UPDATE_ALL_UPDATE=2;this.AUTO_PPR_UPDATE_BLOCK=0;this.AUTO_PPR_INSERT_BEFORE_BLOCK=1;this.AUTO_PPR_INSERT_AFTER_BLOCK=2;this.AUTO_PPR_REMOVE_BLOCK=3;this.AUTO_PPR_FETCH_ID=-99;this.SCROLL_SUCCEEDED=0;this.SCROLL_INDEX_NOT_FOUND=1;this.SCROLL_CANCELLED=2;this.MISSING_AFTER=1;this.MISSING_BEFORE=2;this.NO_BLOCKS=4;this.VIEWPORT_SATISFIED=0;this.NO_SCROLL=-1;this.DW_SUB_ID="dataW";this._CELL_TEXT_KEY="_afrCTK";this._ROW_KEY= "_afrRK";this._ROW_HEADER="_afrRH";this._LEAF_COLUMN="_afrLeaf";this._ROOT_COLUMN="_afrRoot";this._FILTER_COLUMN="_afrFilterCol";this._PANEL_COLLECTION_ID="_afrPCId";this._SELECT_ALL="_afrSelAll";this._COL_COUNT="_afrColCount";this._FILTERABLE="_afrFilterable";this.__SORT_INDICATOR="afrSI";this._SORT_ASCENDING="_afrSortAsc";this._SORT_DESCENDING="_afrSortDesc";this._SORTED_TYPE="_afrSorted";AdfDhtmlTableBasePeer._REMAIN_READ_ONLY="_afrRemainReadOnly";this._SORTED_ASCENDING="1";this._SORTED_DESCENDING= "2";this._SUPPORTS_HOVER="_afrHoverable";this.SELECTALL_KEY_PROPERTY="afrSelectAll";this._SELECTED_CLASS="p_AFSelected";this._INACTIVE_CLASS="p_AFInactive";this._DROP_TARGET_CLASS="p_AFDropTarget";this._HIGHLIGHTED_CLASS="p_AFHighlighted";this._FOCUSED_CLASS="p_AFFocused";this._AUTOSCROLL_MARGIN=40;this._HSCROLLER=0;this._VSCROLLER=1;this._SELECTION_SINGLE="single";this._SELECTION_MULTIPLE="multiple";this._SELECTION_MULTIPLE_NOSELECTALL="multipleNoSelectAll";this._SELECTION_NONE="none";this._EDIT_MODE_CLICKTOEDIT= "clickToEdit";this._MAXIMUM_ROW_REVEAL=8;this._SELECT_PAGE_UP=1;this._SELECT_PAGE_DOWN=2;this._SELECT_ARROW_UP=3;this._SELECT_ARROW_DOWN=4;this._FOCUS_RH_ARROW_UP=5;this._FOCUS_RH_ARROW_DOWN=6;this._FOCUS_ROW_ARROW_UP=7;this._FOCUS_ROW_ARROW_DOWN=8;this._ROW_HEADER_FOCUS_TYPE=0;this._COLUMN_HEADER_FOCUS_TYPE=1;this._TABLE_BODY_FOCUS_TYPE=2;this._SELECT_ALL_FOCUS_TYPE=3;this._FILTER_CELL_FOCUS_TYPE=4;this._FETCH_MORE_CANVAS_SPACE=25;this._INPUT_REGEXP=/^INPUT|SELECT|OPTION|BUTTON|^A\b|TEXTAREA/;this._TWINKLE_ON_STYLE_CLASS= "p_AFTwinkleOn";this._TWINKLE_OFF_STYLE_CLASS="p_AFTwinkleOff";AdfDhtmlTableBasePeer._TWINKLE_TIMER_ID_ATTR="__afrTwinkleTimer";this._ICON_STYLE_EXPANDED="af|table::disclosed-icon-style";this._ICON_STYLE_COLLAPSED="af|table::undisclosed-icon-style";this._ICON_EXPANDED="af|table::disclosed-icon";this._ICON_COLLAPSED="af|table::undisclosed-icon";this._EXPANDED_NODE_KEY="af_table.TIP_EXPANDED_NODE";this._COLLAPSED_NODE_KEY="af_table.TIP_COLLAPSED_NODE";this._DETAIL_COLUMN_MARKER="_afrDetCol";this._DETAIL_ROW_MARKER= "_afrDetRow";this._HAS_DETAIL_MARKER="_hasDetail";this.NEEDS_REFRESH_ATTRIBUTE="_afrNdsRfr";this.UNDO_FETCH_ATTRIBUTE="_afrUndFch";this.NO_RESIZE_MARKER="_noRsz";this._AUTO_HEIGHT_ROWS="_afrAutoHR";this._MAX_ROWHEADER_MSGTYPE_EXPANDO="_afrMRMT";this._CSS_HEIGHT_LIMIT=5E5;this._NAVBAR_FIRST="nb_fr";this._NAVBAR_PREVIOUS="nb_pv";this._NAVBAR_NEXT="nb_nx";this._NAVBAR_LAST="nb_ls";this._NAVBAR_PAGE="nb_pg";this._NAVBAR_PAGE_CNT="nb_cnt_pg";this._NAVBAR_PAGE_INPUT="nb_in_pg";this._NAVBAR_RANGE_TEXT="nb_rng"; this.RERENDER_SELF="RERENDER_SELF";this.RERENDER_CELL="RERENDER_CELL";this.RERENDER_ROW="RERENDER_ROW";this.RERENDER_CONTAINER_CHILDREN="RERENDER_CONTAINER_CHILDREN";this.RERENDER_CONTAINER="RERENDER_CONTAINER";this._RERENDER_PRIORITY={RERENDER_SELF:0,RERENDER_CELL:1,RERENDER_ROW:2,RERENDER_CONTAINER_CHILDREN:3,RERENDER_CONTAINER:4};this._DEFAULT_MAX_CACHED_ROWS_FOR_TOUCH=300;this._MAX_CACHED_ROWS_FOR_TOUCH="_afrMaxTouchRows";this._DATAWRAPPER="dbw";this._SCROLLBAR_BEHAVIOR="_afrScrollBarBehavior"; this._SCROLLBAR_BEHAVIOR_OVERLAY="overlay";this._IMPLICIT_LOAD_MORE="_afrImpldm";this._LOAD_MORE_TOP_DIV="ldmrtp";this._LOAD_MORE_TOP_LINK="ldmrtplnk";this._LOAD_MORE_BOTTOM_DIV="ldmrbttm";this._LOAD_MORE_BOTTOM_LINK="ldmrbttmlnk";this._LOAD_INDEX_ATTR="data-afrldIndx";this._LOAD_MORE_RNG_TOP_TEXT="ldmrrngtptxt";this._LOAD_MORE_RNG_BOTTOM_TEXT="ldmrrngbttmtxt";this._SCROLLER_ANIMATION_CLASS="af|table::scroll-container";this._HIDDEN_WIDTH_DOM_WHEN_STRETCHED_ID="_afrHwdwsId"}; AdfDhtmlTableBasePeer.prototype.InitDomElement=function(a,b){var d=AdfPage.PAGE,e=AdfAgent.AGENT;AdfDhtmlTableBasePeer.superclass.InitDomElement.call(this,a,b);AdfRichUIPeer.addEventHandlerToDomInstance(AdfDhtmlTableBasePeer,b,AdfDhtmlLookAndFeel.MOUSE_MOVE_EVENT_TYPE);AdfRichUIPeer.addEventHandlerToDomInstance(AdfDhtmlTableBasePeer,b,AdfDhtmlLookAndFeel.KEY_DOWN_EVENT_TYPE);this._autoHeightRows=e.getIntAttribute(b,AdfDhtmlTableBasePeer._AUTO_HEIGHT_ROWS,0);var f=this.GetDataBody(b);this._colCount= f?e.getIntAttribute(f,AdfDhtmlTableBasePeer._COL_COUNT,0):0;this._colSelEventSelectedColIds={};this._colSelEventUnselectedColIds={};this._supportsFocusRowNavigation=this.SupportsFocusRowNavigation(a);this._contextMenuSelect=a.getContextMenuSelect();if(!a.getColumnResizing||"enabled"==a.getColumnResizing())this._colResizeDragCallback=this.createCallback(this._handleColResizeDrag),this._colResizeDropCallback=this.createCallback(this._handleColResizeDrop);a.getColumnStretching&&(this._columnStretching= f=a.getColumnStretching(),"blank"==f?this._stretchedColumnId="_afrBlankColumn":0==f.indexOf("column:")&&(this._stretchedColumnId=f.substring(7)));this._editableTableReadOnlyMode=!1;this._hoverHighlightRow=this._isRowSelectionEnabled(a)&&"false"!=d.getLookAndFeel().getSkinProperty("af|table-tr-hover-highlight-row");this._activeDataCount=-1;this._fetchId=0;this._lastColWidth=this._lastColWidthOverride=this._unavailableRowIndex=-1;this._associatedId=a.getProperty("_afrMasterId");null==this._associatedId&& (this._associatedId=a.getProperty("_afrSlaveId"));this._focusManager={};this._streamingDisabled=d.isStreamingDisabled();this._isTouch=e.getCapabilities()[AdfAgent.CAP_TOUCH_SCREEN]!=AdfAgent.CAP_TOUCH_SCREEN_NONE;this._maxCachedRowsForTouch=null!=a.getProperty(AdfDhtmlTableBasePeer._MAX_CACHED_ROWS_FOR_TOUCH)?a.getProperty(AdfDhtmlTableBasePeer._MAX_CACHED_ROWS_FOR_TOUCH):AdfDhtmlTableBasePeer._DEFAULT_MAX_CACHED_ROWS_FOR_TOUCH;e.getOS()==AdfAgent.MAC_OS?this._scrollbarBehavior=null:this._scrollbarBehavior= a.getProperty(AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR);this._hShiftLoadMoreDataBody=this._hShiftDataBody="0px";this._insertDeleteAnimationInEffect=!1;"loadMore"==a.getProperty("scrollPolicy")&&(this._isLoadMore=!0);if(this._isImplicitLoadMore=a.getProperty(AdfDhtmlTableBasePeer._IMPLICIT_LOAD_MORE))this._isLoadMore=!0;this._disableRowMouseDownCellFocus=a.getProperty("_disableRowMouseDownCellFocus");this._isSyncRows=a.getProperty("_afrSyncRows");this._twinkledCells=[];this._twinkledCellAnnouncements= "";AdfPage.PAGE.__registerDescendantResizeNotifyComponent(a)};AdfDhtmlTableBasePeer.prototype.isDragAvailable=function(a){AdfAssert.assertDomElement(a);if(a){var b=this._isTargetCellEditable(a),d=null!=this._getTargetRowHeader(a);a=this._isTargetTextOnlyNode(a);if(d||b||a)return!1}return!0};AdfDhtmlTableBasePeer.prototype.TruncateClientId=function(a,b,d,e){b=d.split(":");a=a.getClientId();a=AdfStrings.count(a,":")+1;(b=b[a])&&(isNaN(b)||e.push(a))}; AdfDhtmlTableBasePeer.prototype.ComponentRemoved=function(a){this._touchMoveManager&&this._touchMoveManager.unregister();AdfPage.PAGE.__unregisterDescendantResizeNotifyComponent(a);AdfDhtmlTableBasePeer.superclass.ComponentRemoved.call(this,a)};AdfDhtmlTableBasePeer.prototype.needsChildVisibilityChanges=function(a){return!0};AdfDhtmlTableBasePeer.prototype.ChildVisibilityChanged=function(a,b,d){AdfPage.PAGE.addPartialTargets(this.getComponent());return!0}; AdfDhtmlTableBasePeer.prototype.SupportsFocusRowNavigation=function(){return!0};AdfDhtmlTableBasePeer.prototype.AllowCellNavigation=function(){return 0this._canvasHeight&&(this._canvasHeight=a,this._setFakeCanvasHeight(a)))}}; AdfDhtmlTableBasePeer.prototype.ResizeNotify=function(a,b,d,e){delete this._cachedFirstVisibleRowKeyAndRow;a=AdfAgent.AGENT;b=this.getComponent();b=b.getClientId();if(a=a.getElementById(AdfRichUIPeer.CreateSubId(b,AdfDhtmlTableBasePeer._HIDDEN_WIDTH_DOM_WHEN_STRETCHED_ID)))a.style.width=d+"px";if(this._virtInitialized){a=this.GetDataBody();this.isHeightAutoSized()?this.AdjustAutoHeight():(this._updateScrollDivHeight(a),this._setScrollerHeight(e,this._cachedCHHeight,this._cachedCFHeight,this._cachedNBHeight)); this._setScrollerWidth(d,this._frozenWidth);this.SizeDataBody(a,d,e);b=this.__getScrollLeft();var f=this._getScrollTop();(this._currentScrollTop!=f||this._currentScrollLeft!=b)&&this.scrollToPos(this._currentScrollLeft,this._currentScrollTop);this._stretchTheColumns();this._syncDataBodyHeights();!this._isPaged&&(!this._isLoadMore&&-1==this._rowCount&&this._canvasHeightAdfAgent.AGENT.getVersion()){if((d=AdfDhtmlTableBasePeer.__getChildBySubId(b,"t"))&&d.rows.length)d.rows[0].style.position="absolute";if(b=AdfDhtmlTableBasePeer.__getChildBySubId(b,"d2")){if((d=AdfDhtmlTableBasePeer.__getChildBySubId(b, "t2"))&&d.rows.length)d.rows[0].style.position="absolute";AdfDhtmlTableBasePeer._isRTL()&&(d.style.right="0px")}}}else this._headerless=!0,this._cachedCHHeight=0};AdfDhtmlTableBasePeer.prototype._hasFrozenColumn=function(){return 0<=this._lastFrozen||0<=this._firstFrozen};AdfDhtmlTableBasePeer.prototype._freezeColumnsToStart=function(){return 0<=this._lastFrozen};AdfDhtmlTableBasePeer.prototype._freezeColumnsToEnd=function(){return 0<=this._firstFrozen}; AdfDhtmlTableBasePeer.prototype._areAllColumnsFrozen=function(a){return 0<=this._lastFrozen&&a==this._lastFrozen+1||0==this._firstFrozen};AdfDhtmlTableBasePeer.prototype._isColumnFrozen=function(a){return 0<=this._lastFrozen&&a<=this._lastFrozen||0<=this._firstFrozen&&a>=this._firstFrozen};AdfDhtmlTableBasePeer.prototype._hasSingleScroller=function(){return this._footerless&&!this._freezeColumnsToEnd()}; AdfDhtmlTableBasePeer.prototype._initColumnFooter=function(){var a=this._getColumnFooter();a?(this._synchronizeColumnRowHeights(a,"ft","fd2","ft2"),this._cachedCFHeight=a.offsetHeight):(this._footerless=!0,this._cachedCFHeight=0)}; AdfDhtmlTableBasePeer.prototype._initNavBar=function(){var a=this._getNavigationBar();if(a){this._hasNavBar=!0;setTimeout(function(){var a=AdfPage.PAGE.getActiveDomElement(),b=AdfPage.PAGE.getLookAndFeel().getSkinProperty("af|table::navbar-page-link");null!=a&&a.className==b&&a.blur()},0);this._cachedNBHeight=a.offsetHeight;var b=AdfAgent.AGENT.getElementById(AdfRichUIPeer.CreateSubId(this.getComponent().getClientId(),"nb_cnt"));this._cachedNBWidth=b.offsetWidth;this._isPaged=!0;this.RegisterFirstPropertyChange(); if(null!=this.getComponent().getProperty("_afrSlaveId")||null!=this.getComponent().getProperty("_afrMasterId"))a.firstChild.style.display="none",a.style.height=0,this._cachedNBHeight=a.offsetHeight,this._cachedNBWidth=b.offsetWidth}else this._cachedNBWidth=this._cachedNBHeight=0;this._nbarMin=!1}; AdfDhtmlTableBasePeer.prototype._initLoadMore=function(){var a=this._getLoadMore(!1),b=this._getLoadMore(!0);a?(this._cachedFMHeight=a.offsetHeight,this._cachedFMWidth=a.offsetWidth,a.style.display="none",a.style.overflow="hidden",a.style.zIndex=1,a.style.visibility="visible",b.style.display="none",b.style.overflow="hidden",b.style.zIndex=1,b.style.visibility="visible",a=this.__getColumnHeader(),null!=a&&(a.style.zIndex=2)):this._cachedFMWidth=this._cachedFMHeight=0}; AdfDhtmlTableBasePeer.prototype.__fixPanelCollectionDimensions=function(a){if(this._autoHeightRows){var b=this.getDomElement(),d=this.GetPanelCollectionPeer(),e=d.getDomElement(),f=d.getDomElement(),g=this.GetPanelCollectionComponent(),h=AdfAgent.getAgent(),k=h.getPlatform()==AdfAgent.WEBKIT_PLATFORM;if(d&&g){var l=g.getClientId(),g=h.getElementById(AdfRichUIPeer.CreateSubId(l,d.__getAutoHeightTopFacetId())),l=h.getElementById(AdfRichUIPeer.CreateSubId(l,d.__getAutoHeightBottomFacetId())),g=g?g.offsetHeight: 0,l=l?l.offsetHeight:0;d.isDetached()?(e=b.parentNode.parentNode,d=b.style,!a&&null==f.getAttribute("_afrPreDetachW")&&(a=d.width,""===a&&(a=this.GetDataBody().offsetWidth+this._getScrollbarWidth(),a+="px"),f.setAttribute("_afrPreDetachW",a),f.setAttribute("_afrPreDetachH",d.height)),k?(f=h.getComputedStyle(b),b.style.width=e.clientWidth-parseInt(f.borderLeftWidth)-parseInt(f.borderRightWidth)+"px"):h.setOuterWidth(b,e.clientWidth),h.setOuterHeight(b,e.clientHeight-g-l)):(h=f.getAttribute("_afrPreDetachH"), void 0!=h&&(b.style.height=h,f.removeAttribute("_afrPreDetachH")),h=f.getAttribute("_afrPreDetachW"),void 0!=h&&(b.style.width=a?"":h,f.removeAttribute("_afrPreDetachW")),this._sizeOuterContainer(e,b.offsetHeight+g+l))}}};AdfDhtmlTableBasePeer.prototype._isContainerStretched=function(){var a=this.getDomElement().style;return"absolute"==a.position&&a.top&&0b.getVersion()&&d.scrollWidth<=d.offsetWidth&&(e.height=d.clientHeight+"px",a=!0),a||(b.setOuterHeight(d,d.offsetHeight),a=!0));e.overflowX="";e.overflowY=""}return a};AdfDhtmlTableBasePeer.prototype.BeginHandleDataBlocks=function(){}; AdfDhtmlTableBasePeer.prototype.ReplaceDomElement=function(a,b){var d=a.id;if(0=q;r--){var v=r-p.startRow;if(0==v){AdfAssert.assert(null!=p.rows&&null!=p.rows[0],"Unable to copy cell widths when the block contains no rows!"); for(var w=p.rows[0].cells,y=p.rows[1].cells,z=0;zg?C*q:-1==l&&!m&&!n&&Ae.clientHeight,k=("auto"==b.style.overflowX||"auto"==b.style.overflow)&&b.offsetHeight>b.clientHeight, l=parseInt(a.style.height),m=parseInt(d.style.height);!isNaN(l)&&!isNaN(m)&&(k&&!h?(a.style.height=m+"px",e.style.height=b.style.height,e.style.overflowX="scroll",f.style.height=g.style.height):h&&!k?(d.style.height=l+"px",b.style.height=e.style.height,b.style.overflowX="scroll",g.style.height=f.style.height):"auto"==b.style.overflowX?(e.style.overflowX="auto",a.style.height=m+"px",e.style.height=b.style.height,f.style.height=g.style.height):(b.style.overflowX="auto",d.style.height=l+"px",b.style.height= e.style.height,g.style.height=f.style.height))}}}; AdfDhtmlTableBasePeer.prototype._createAndInitializeScroller=function(a,b,d,e,f,g){var h=AdfAgent.AGENT,k;if(this._hasSingleScroller()&&!this._isPaged&&!this._freezeColumnsToEnd()){var l=this.getDomDocument();k=l.createElement("div");k.tabIndex=-1;k.id=a.id+"::scroller";var m=k.style;m.position="absolute";this._isTouch&&h.getPlatform()==AdfAgent.WEBKIT_PLATFORM&&(m.setProperty("-webkit-overflow-scrolling","touch"),m.setProperty("-webkit-transform","translateZ(0px)"),h.getOS()==AdfAgent.MAC_OS&&AdfDomUtils.addCSSClassName(k, AdfPage.PAGE.getLookAndFeel().getStyleClass(AdfDhtmlTableBasePeer._SCROLLER_ANIMATION_CLASS)));if(null!=this._associatedId){var n=this.getComponent();null!=n.getProperty("_afrSlaveId")?(m.overflowX="auto",m.overflowY="hidden"):m.overflow="auto";n=n.getParent().findComponent(this._associatedId);AdfAssert.assert(null!=n,"There is no associated table");this._associatedPeer=n.getPeer();n=n.getPeer();null!=n&&n._associatedPeer!=this&&(n._associatedPeer=this)}else this._freezeColumnsToEnd()?(m.overflowX= "auto",m.overflowY="hidden"):m.overflow="auto";m.zIndex=0;m.width=Math.max(b-f,0)+"px";m.top=this._cachedCHHeight+"px";m.height=Math.max(d-this._cachedCHHeight,0)+"px";AdfDhtmlTableBasePeer._isRTL()?this._freezeColumnsToEnd()?m.right="0px":m.left="0px":this._freezeColumnsToEnd()?m.left="0px":m.right="0px";l=l.createElement("div");m=h.getIntAttribute(g,"_totalWidth",-1);-1==m&&(m=g.offsetWidth);h.getPlatform()==AdfAgent.IE_PLATFORM&&(l.style.position="absolute");l.style.width=m-f+"px";this._canvasHeight= e;e>AdfDhtmlTableBasePeer._CSS_HEIGHT_LIMIT?(l.style.height=AdfDhtmlTableBasePeer._CSS_HEIGHT_LIMIT+"px",this._canvasHeightLimited=!0):(l.style.height=e+"px",this._canvasHeightLimited=!1);l.style.visibility="hidden";k.appendChild(l);a.appendChild(k);h.elementsAdded(k)}else k=this._createAndInitializeColumnFooterScroller(a,b,d,e,f,g);this._scrollbarBehavior==AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR_OVERLAY&&(e=this.GetDataBody(),g=h.getComputedStyle(a),f=this.getDomDocument().createElement("div"), f.setAttribute("id",AdfRichUIPeer.CreateSubId(a.id,AdfDhtmlTableBasePeer._DATAWRAPPER)),l=f.style,this._cachedScrollerWidthAddl=a.offsetWidth-b,this._cachedScrollerHeightAddl=a.offsetHeight-d,l.height=a.offsetHeight-this._cachedCHHeight-this._cachedCFHeight+"px",l.width=a.offsetWidth+"px",l.backgroundColor=g.backgroundColor,l.overflowX="hidden",l.overflowY="hidden",l.position="relative",l.zIndex=1,this._addScrollEventListeners(f),a.insertBefore(f,e),this._isLoadMore?(a=this._getLoadMore(!1),b=this._getLoadMore(!0), null!=b&&f.appendChild(b),f.appendChild(e),null!=a&&f.appendChild(a)):f.appendChild(e),h.elementsAdded(f),this._hasSingleScroller()&&!this._isPaged?(vscroller=this.GetScroller(),hscroller=this.GetScroller()):(vscroller=this.GetScroller()[AdfDhtmlTableBasePeer._VSCROLLER],hscroller=this.GetScroller()[AdfDhtmlTableBasePeer._HSCROLLER]),vscroller.style.visibility="hidden",hscroller.style.visibility="hidden",this._dataBodyWrapped=this._scrollbarHidden=!0);return k}; AdfDhtmlTableBasePeer.prototype._initScrollLeftTop=function(a,b){this._currentScrollTop=b;this._hasSingleScroller()&&!this._isPaged?(0this.__getColumnResizeMargin()&&(this._mdPos=null,this._processColumnReorderAction(b))}else if(this._reorderTH)AdfDhtmlTableBasePeer.SetCursor(this._reorderTH, "move");else if(d=this.__getColumnHeaderMouseAction(b))e=d.cell,"resize"==d.type&&this._getResizedCellInfo(d)&&(!a.getColumnResizing||"enabled"==a.getColumnResizing())?AdfDhtmlTableBasePeer.SetCursor(e,AdfAgent.AGENT.getCursor("col-resize")):"move"==d.type?AdfDhtmlTableBasePeer.SetCursor(e,AdfAgent.AGENT.getCursor("move")):"default"==d.type?AdfDhtmlTableBasePeer.SetCursor(e,"default"):AdfDhtmlTableBasePeer.SetCursor(e,"")}; AdfDhtmlTableBasePeer.prototype.__handleColumnResizing=function(a,b){if(null==b&&(b=this.__getColumnHeaderMouseAction(a.getNativeEvent()),null==b))return;if("resize"==b.type){var d=this._getResizedCellInfo(b);d&&(this._resizedTH=d.cell,this._resizedIndex=d.displayIndex,this._showColumnResizeIndicator(d.cell,d.displayIndex),this._resizeColDelta=0,d=this.__getColumnHeader(),AdfAgent.AGENT.disableUserSelect(d),a.cancel(),d=a.getNativeEvent(),AdfPage.PAGE.startDrag(d,this._colResizeDragCallback,this._colResizeDropCallback))}}; AdfDhtmlTableBasePeer.prototype.HandleComponentMouseDown=function(a){var b=a.getNativeEvent(),d=this.__getColumnHeaderMouseAction(b),e=d?d.type:null;if((this._virtInitialized||"clearAllFilter"==e)&&this.__isOwnComponentEvent(a)){var f=AdfAgent.AGENT,g=f.getEventTarget(b),h=this.GetRowKeyAndRow(g,this.getDomElement());if(null!=h){var k=h[0],h=h[1];if(null!=k){this._handleRowMouseDown(b,g,f.isLeftButton(b),f.isSelectionToggle(b),b.shiftKey,k,h);return}}f.isLeftButton(b)&&(k=this._isTargetCellFilter(g), this._isTargetCellEditable(g,k)&&"clearAllFilter"!=e?k&&(this._editableTableReadOnlyMode&&this._setReadOnlyMode(!1,g,!1),this._setHeaderCellFocus(this._getParentTH(b))):e&&("selectAll"==e?(this._grabFocus(),(b=this.getComponent().getSelectedRowKeys())&&b[AdfDhtmlTableBasePeer.SELECTALL_KEY_PROPERTY]?(this._selUnselectAll(),this._queueColumnSelectionEvent()):this._selSelectAll()):"clearAllFilter"==e?(b=this.getComponent(),f=new AdfQueryEvent(b),f.setClearAll(!0),b.queueEvent(f),b.setSelectedRowKeys(null)): "resize"==e?this.__handleColumnResizing(a,d):"move"==e?(this._mdPos=f.getMousePosition(b),this._reorderTH=d.cell,a.cancel()):"select"==e&&(this._grabFocus(),a=d.colIndices,0AdfAgent.AGENT.getVersion()?this.getDomDocument().selection.createRange().text:window.getSelection().toString();!b&&""!=d&&a.select()}; AdfDhtmlTableBasePeer.prototype.HandleComponentDblClick=function(a){this._virtInitialized&&(this.__isOwnComponentEvent(a)&&this._isTargetCellEditable(a.getNativeEventTarget()))&&(this._ctePatternStart=void 0)}; AdfDhtmlTableBasePeer.prototype._getOnlyTextNode=function(a){var b=a.ownerDocument,d=null;if(b.evaluate&&AdfAgent.AGENT.getPlatform()!=AdfAgent.EDGE_PLATFORM)a=b.evaluate(".//text()",a,null,XPathResult.ANY_TYPE,null),(d=a.iterateNext())&&a.iterateNext()&&(d=null);else{(b=a.firstChild)&&3==b.nodeType&&(d=b);a=a.getElementsByTagName("*");for(var e=a.length,f=0;fb.colSpan){var d=AdfRichUIPeer.CreateSubId(b.id,AdfDhtmlTableBasePeer.__SORT_INDICATOR),d=a.getElementById(d);if(null!=d){var e=d.getAttribute(AdfDhtmlTableBasePeer._SORTED_TYPE),f=d.getAttribute(AdfDhtmlTableBasePeer._SUPPORTS_HOVER);null==e&&f&&(d.style.visibility="hidden")}}}; AdfDhtmlTableBasePeer.prototype.HandleComponentClick=function(a){if(!this.__isOwnComponentEvent(a))return!1;var b=this.getComponent(),d=AdfAgent.AGENT,e=a.getNativeEvent(),f=d.getEventTarget(e),g=this.GetRowKeyAndRow(f,this.getDomElement());if(null!=g){var h=g[0],g=g[1];if(null!=h)return a.isLeftButtonPressed()&&(a=this._getExpandAction(f),"expand"==a?b.setDisclosedRowKey(h,!0):"collapse"==a?b.setDisclosedRowKey(h,!1):this._handleRowClick(f,d.isLeftButtonClick(e),d.isSelectionToggle(e),e.shiftKey, h,g)),!0}if(!this._headerless&&(h=this.__getColumnHeaderMouseAction(e))&&"sort"==h.type&&!a.isCanceled())return AdfTableUtils.queueSortEvent(b,[h.sortProperty],[h.sortOrder]),d.eatEvent(e),!1;this._hasNavBar&&this.__handleNavBarItemsClick(e,f);this._isLoadMore&&this.__handleLoadMoreItemsClick(e,f);return!0};AdfDhtmlTableBasePeer.prototype.HandleComponentValueChange=function(a){this._handleComponentEventForFilterCell(a)}; AdfDhtmlTableBasePeer.prototype._handleComponentEventForFilterCell=function(a){if(!a.isCanceled()){var b=a.getSource(),d=b.getPeer();d.bind(b);b=d.getDomElement();this._isTargetCellFilter(b)&&a.propagatesToServer()&&this._handleFilterCellAction()}};AdfDhtmlTableBasePeer.prototype._skipScrollRequest=function(){return AdfAgent.AGENT.getPlatform()==AdfAgent.WEBKIT_PLATFORM&&this._scrollTopUpdating&&!this._isTouch&&this._currentScrollTop==this._getScrollTop()}; AdfDhtmlTableBasePeer.prototype.HandleDomScroll=function(a,b){if(!this._skipScrollRequest()){var d=this.__getScrollLeft(),e;e=null!=this._associatedPeer&&AdfAgent.AGENT.getPlatform()==AdfAgent.GECKO_PLATFORM&&null!=a.getProperty("_afrSlaveId")?-1:this._getScrollTop();this.scrollToPos(d,e);this._associatedPeerScroll(-1,e)}}; AdfDhtmlTableBasePeer.prototype._associatedPeerScroll=function(a,b,d){if(null!=this._associatedPeer)if(d=!d?1:++d,this._associatedPeer._virtInitialized)this._associatedPeer.scrollToPos(a,b);else if(4>d){var e=this;setTimeout(function(){e._associatedPeerScroll(a,b,d)},0)}else AdfLogger.LOGGER.severe("Tried 3 times w/ _associatedPeerScroll "+a+" : "+b)}; AdfDhtmlTableBasePeer.prototype._handleInnerTableScroll=function(a){a||(a=AdfPage.PAGE.getDomWindow().event);var b=AdfAgent.AGENT.getEventTarget(a);null!=this._touchMoveManager&&(b=a.target);this.scrollToPos(AdfAgent.AGENT.getScrollLeft(b),-1)}; AdfDhtmlTableBasePeer.prototype._handleDataBodyScroll=function(){var a=-1,b,d;if(this._skipScrollRequest())if(b=this.GetDataBody(),d=b.firstChild){if(a=AdfAgent.AGENT.getScrollLeft(b),a==this._currentScrollLeft)return}else return;!0===this._handleDataCallbackBeingProcessed?(null!=this._handleDataBodyScrollTimeout&&(window.clearTimeout(this._handleDataBodyScrollTimeout),delete this._handleDataBodyScrollTimeout),this._handleDataBodyScrollTimeout=window.setTimeout(this.createCallback(this._handleDataBodyScroll), 0)):(b||(b=this.GetDataBody()),d||(d=b.firstChild),d&&(d=b.scrollTop+d.startPos-parseInt(this._hShiftDataBody)-parseInt(this._hShiftLoadMoreDataBody),!this._hasFrozenColumn()&&-1==a&&(a=AdfAgent.AGENT.getScrollLeft(b)),this.scrollToPos(a,d),this._associatedPeerScroll(-1,d)))};AdfDhtmlTableBasePeer.prototype.__getScrollPos=function(){return null!=this.GetScroller()?{x:this.__getScrollLeft(),y:this._getScrollTop()}:null}; AdfDhtmlTableBasePeer.prototype.__restoreScrollerPositions=function(a,b){this._setScrollTop(b);this._setScrollLeft(a)}; AdfDhtmlTableBasePeer.prototype.scrollToPos=function(a,b,d,e){var f=this.getComponent(),g=AdfDhtmlTableBasePeer.NO_SCROLL;void 0===e&&(e=!0);if(-1!=b&&this._currentScrollTop!=b){delete this._cachedFirstVisibleRowKeyAndRow;d||f.setProperty("scrollTop",b,!0,AdfUIComponent.PROPAGATE_ALWAYS);this._setScrollTop(b);g=this._handleVerticalScroll(b,e);this._isPaged||(b=this.GetFirstVisibleRowKeyAndRow(),null!=b.rowKey&&f.setProperty("scrollTopRowKey",b.rowKey,!0,AdfUIComponent.PROPAGATE_ALWAYS));b=this.GetDataBody().childNodes; for(e=b.length-1;0<=e;e--)this._synchronizeRowHeights(b[e])}-1!=a&&this._currentScrollLeft!=a&&(d||f.setProperty("scrollLeft",a,!0,AdfUIComponent.PROPAGATE_ALWAYS),this._setScrollLeft(a),this._handleHorizontalScroll(a));return g}; AdfDhtmlTableBasePeer.prototype.HandleDomKeyDown=function(a,b){var d=AdfAgent.AGENT,e=a.getClientId(),f=d.getEventTarget(b),g=b.keyCode;switch(g){case AdfKeyStroke.ARROWUP_KEY:case AdfKeyStroke.ARROWDOWN_KEY:case AdfKeyStroke.ARROWRIGHT_KEY:case AdfKeyStroke.ARROWLEFT_KEY:case AdfKeyStroke.HOME_KEY:case AdfKeyStroke.END_KEY:e=!0;this._isTargetCellEditable(f)||(g==AdfKeyStroke.HOME_KEY||g==AdfKeyStroke.END_KEY?this._handleHomeEndKey(g,b):this._handleArrow(g,b),e=!1);e||d.eatEvent(b);break;case AdfKeyStroke.ENTER_KEY:d= this._getParentTH(b),g=AdfRichUIPeer.CreateSubId(e,AdfDhtmlTableBasePeer._NAVBAR_PAGE_INPUT),d&&null!=d.getAttribute("_afrFH")?(e=new AdfQueryEvent(a),e.setClearAll(!0),a.queueEvent(e),a.setSelectedRowKeys(null)):f.id==g&&(d=a.getProperty("rows"),0this._getScrollerOffsetHeight()&&(b=this._getScrollerOffsetWidth()-this._getScrollerClientWidth(),AdfDhtmlTableBasePeer._isRTL()?(d.style.left=b+"px",this._headerless||(a.style.left=b+"px")):(d.style.left=-1*b+"px",this._headerless||(a.style.left=-1*b+"px"))):(d.style.left="0px",this._headerless||(a.style.left="0px")))}; AdfDhtmlTableBasePeer.prototype._handleVerticalScroll=function(a,b){if(!(this._pendingFetch==AdfTableDataFetchEvent.EXPAND_SUBTYPE||this._pendingFetch==AdfTableDataFetchEvent.COLLAPSE_SUBTYPE)&&!this._insertDeleteAnimationInEffect){var d=this.GetDataBody();if(this._isPaged)return d.scrollTop=a,AdfDhtmlTableBasePeer.VIEWPORT_SATISFIED;if(this._isLoadMore)return d.scrollTop=a,this._scrollbarBehavior==AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR_OVERLAY&&this._checkScrollbarHidingAffordance(),this._checkLoadMore(), AdfDhtmlTableBasePeer.VIEWPORT_SATISFIED;d=this._fillViewPort(d,d.offsetHeight,b,!0);null!=this._selectionRequest&&(d==AdfDhtmlTableBasePeer.VIEWPORT_SATISFIED?this._processSelectionRequest():d!=AdfDhtmlTableBasePeer.MISSING_BEFORE&&d!=AdfDhtmlTableBasePeer.MISSING_AFTER&&delete this._selectionRequest);null!=this._clickEditRequest&&d==AdfDhtmlTableBasePeer.VIEWPORT_SATISFIED&&this._processClickToEditActivateRequest();this._scrollbarBehavior==AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR_OVERLAY&&this._checkScrollbarHidingAffordance(); return d}}; AdfDhtmlTableBasePeer.prototype._fillViewPort=function(a,b,d,e){var f=AdfDhtmlTableBasePeer.VIEWPORT_SATISFIED;if(this._isPaged)return this._hideStatus(),AdfDhtmlTableBasePeer.SetCursor(a,""),this.AdjustAutoHeight(),f;if(this._isLoadMore)return this._stretchTheColumns(),f=this._isViewportSatisfied(a,b),f&AdfDhtmlTableBasePeer.MISSING_AFTER?this._addBelow(a,b,d,e):(this._hideStatus(),AdfDhtmlTableBasePeer.SetCursor(a,""),this.AdjustAutoHeight()),f;0AdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE?AdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE:b;return a.scrollTopAdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE?AdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE:b;AdfAgent.guessOS()==AdfAgent.ANDROID_OS&&(b=Math.ceil(a.offsetHeight/10));return a.scrollHeight- a.scrollTop-a.offsetHeight<=b?!0:!1}; AdfDhtmlTableBasePeer.prototype._isScrollerRight=function(){if(null==this.GetScroller())return!1;var a=null,a=this._hasSingleScroller()&&!this._isPaged?this.GetScroller():this.GetScroller()[AdfDhtmlTableBasePeer._HSCROLLER];if(0==a.scrollLeft)return!1;var b=a.scrollWidth-a.clientWidth,d=Math.ceil((0AdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE?AdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE:d;return b-a.scrollLeft<=d?!0:!1}; AdfDhtmlTableBasePeer.prototype._checkLoadMore=function(){if(this._isLoadMore){var a=AdfAgent.AGENT,b=this.getComponent(),d=this.GetDataBody();this._loadMoreAdjWidth=this._loadMoreFullWidth=d.style.width;if(this._scrollbarBehavior==AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR_OVERLAY){var e=this.getDomElement();this._loadMoreAdjWidth=AdfAgent.AGENT.getElementById(AdfRichUIPeer.CreateSubId(e.id,AdfDhtmlTableBasePeer._DATAWRAPPER)).style.width}var e=d.childNodes,f=this._getLoadMore(!1),g=this._getLoadMore(!0), h=!1,k=!1,l=this.GetScroller();null!=l&&!this._hasSingleScroller()&&(l=l[AdfDhtmlTableBasePeer._VSCROLLER]);var m=0l.clientHeight?!0:!1;this._isScrollerBottom()||!m&&!l?this._checkMoreHasRows(d,!1)&&(h=!0):this._isScrollerTop()&&this._checkMoreHasRows(d,!0)&&(k=!0);if(h){if(this._isImplicitLoadMore&&!this._implicitLoadMoreFetched)this._loadMoreFetch(!0),this._implicitLoadMoreFetched=!0;else if(!this._isBottomLoadMoreDisplayed&&!this._isImplicitLoadMore){this._hShiftLoadMoreDataBody= (m||l)&&d.scrollHeight+this._cachedFMHeight>=d.clientHeight?-1*this._cachedFMHeight+"px":"0px";d.style.top=parseInt(this._hShiftLoadMoreDataBody)+parseInt(this._hShiftDataBody)+"px";f.style.top=parseInt(this._hShiftLoadMoreDataBody)+parseInt(this._hShiftDataBody)+"px";f.style.display="block";f.style.width=this._loadMoreAdjWidth;this._isBottomLoadMoreDisplayed=!0;if(!this._bottomLoadMoreHeight){var n=f.offsetHeight;n&&(h=f.childNodes[0].childNodes[0].offsetHeight,h=Math.ceil((n-h)/2),this._isTouch? (f=a.getElementById(AdfRichUIPeer.CreateSubId(b.getClientId(),AdfDhtmlTableBasePeer._LOAD_MORE_BOTTOM_LINK)),f.style.paddingTop=h+"px",f.style.display="inline-block"):f.childNodes[0].style.top=h+"px",this._bottomLoadMoreHeight=n)}!m&&!l&&this._adjustCanvasHeight(this._bottomLoadMoreHeight,d,!1)}m=e.length;d=e[0];m=e[m-1];this._updateLoadMoreItemsRangeText(d.startRow,m.startRow+m.numRows,this._knownRowCount,!1)}else this._isImplicitLoadMore&&this._implicitLoadMoreFetched?this._implicitLoadMoreFetched= !1:this._isBottomLoadMoreDisplayed&&!this._isImplicitLoadMore&&(d.style.top="0px",f.style.top="0px",f.style.display="none",this._isBottomLoadMoreDisplayed=!1,this._hShiftLoadMoreDataBody="0px");if(k){if(this._isImplicitLoadMore&&!this._implicitLoadMoreFetched)this._loadMoreFetch(!1);else if(!this._isTopLoadMoreDisplayed&&!this._isImplicitLoadMore&&(g.style.display="block",g.style.width=this._loadMoreAdjWidth,this._isTopLoadMoreDisplayed=!0,!this._topLoadMoreHeight&&(k=g.offsetHeight)))h=g.childNodes[0].childNodes[0].offsetHeight, h=Math.ceil((k-h)/2),this._isTouch?(a=a.getElementById(AdfRichUIPeer.CreateSubId(b.getClientId(),AdfDhtmlTableBasePeer._LOAD_MORE_TOP_LINK)),a.style.paddingTop=h+"px",a.style.display="inline-block"):g.childNodes[0].style.top=h+"px",this._topLoadMoreHeight=k;m=e.length;d=e[0];m=e[m-1];this._updateLoadMoreItemsRangeText(d.startRow,m.startRow+m.numRows,this._knownRowCount,!0)}else this._isImplicitLoadMore&&this._implicitLoadMoreFetched?this._implicitLoadMoreFetched=!1:this._isTopLoadMoreDisplayed&&!this._isImplicitLoadMore&& (g.style.display="none",this._isTopLoadMoreDisplayed=!1)}};AdfDhtmlTableBasePeer.prototype._checkMoreHasRows=function(a,b){for(var d=a.childNodes,e=d.length,f=0,g=!1,h=0;hthis.GetRowCount()))g=!0;return g}; AdfDhtmlTableBasePeer.prototype._checkScrollbarHidingAffordance=function(){var a=this.GetDataBody();this._isScrollerBottom()?this._getScrollWidth()>this._getScrollerOffsetWidth()&&(this._hShiftDataBody=-1*(this._getScrollerOffsetHeight()-this._getScrollerClientHeight())-this._cachedCFHeight+"px",a.style.top=this._isBottomLoadMoreDisplayed?parseInt(this._hShiftDataBody)+parseInt(this._hShiftLoadMoreDataBody)+"px":this._hShiftDataBody):(this._hShiftDataBody="0px",a.style.top="0px")}; AdfDhtmlTableBasePeer.prototype._isViewportSatisfied=function(a,b){for(var d=a.childNodes,e=d.length,f=AdfDhtmlTableBasePeer.NO_BLOCKS,g=this._currentScrollTop,h=0,k=0;k=b||g>=e-b&&d.startRow+d.numRowsb||0>l))f=AdfDhtmlTableBasePeer.NO_BLOCKS}}return f}; AdfDhtmlTableBasePeer.prototype._addAbove=function(a,b,d,e){var f=a.childNodes,g=f.length,h=f[0];if(0==h.startRow){for(h=e=0;h=l){e=this._canvasHeight-b;h=this._canvasHeight;k=!1;for(g-=1;0<=g;g--)l=f[g],h-=l.cachedHeight,l.startPos!=h&&(k=!0,l.startPos=h);if(this._currentScrollTop!=e||k)this._setScrollTop(e),this._fillViewPort(a,b,d)}else a=k-1,b=this._getBlockLastRowKey(h),this._startFetch(AdfTableDataFetchEvent.AFTER_KEY_SUBTYPE,a,b,d,!e)}; AdfDhtmlTableBasePeer.prototype._handleLongJump=function(a,b,d,e){var f,g,h,k,l,m=this.getComponent().getFetchSize();f=this._currentScrollTop;k=this.GetKnownRowCount();var n=AdfPage.PAGE.getLookAndFeel();h=this._canvasHeightLimited?AdfDhtmlTableBasePeer._CSS_HEIGHT_LIMIT:this._canvasHeight;g=-1==this.GetRowCount()||this._canvasHeightLimited?AdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE:0;f>=h-g-b?(h=AdfTableDataFetchEvent.UP_TO_INDEX_SUBTYPE,g=k-1,f=n.getTranslatedString("af_table.LABEL_END"),-1== this.GetRowCount()&&(f=n.getTranslatedString("af_table.LABEL_ROW",g+1)),l=g,k=l-m+1):(h=AdfTableDataFetchEvent.FROM_INDEX_SUBTYPE,0==f?(f=n.getTranslatedString("af_table.LABEL_START"),g=0):(g=Math.round(f/this._averageRowHeight),f=n.getTranslatedString("af_table.LABEL_ROW",g+1),AdfAssert.assert(g=p&&k=p&&ll+k.cachedHeight||l>b){if(f._isLoadMore){l=k.startPos;0==l&&e+1g.length-1||(this._isTouch||this._isLoadMore)&&k<=e);l++)k=m(l,k)}; AdfDhtmlTableBasePeer.prototype._unregisterNode=function(a){AdfPage.PAGE.removeComponentsInSubtree(a);AdfAgent.AGENT.elementsRemoved(a)};AdfDhtmlTableBasePeer.prototype._repositionBlocksForScroll=function(a){var b=a.firstChild,d=this._currentScrollTop;b&&(a.scrollTop=d-b.startPos);!this._isTouch&&AdfAgent.AGENT.getPlatform()==AdfAgent.WEBKIT_PLATFORM&&(this._scrollTopUpdating=!0,setTimeout(AdfDhtmlTableBasePeer._resetScrollTopUpdating,100,this))}; AdfDhtmlTableBasePeer._resetScrollTopUpdating=function(a){a._scrollTopUpdating=!1};AdfDhtmlTableBasePeer.prototype._undoScroll=function(){var a=this.GetDataBody(),b=a.firstChild;b&&this._setScrollTop(b.startPos+a.scrollTop)};AdfDhtmlTableBasePeer.prototype._restoreSavedDisclosureState=function(){this.getComponent().setProperty("disclosedRowKeys",this._savedDisclosedState,!1,AdfUIComponent.PROPAGATE_NEVER);this._savedDisclosedState=void 0}; AdfDhtmlTableBasePeer.prototype._queueFetchEvent=function(a,b,d,e){var f=this._fetchId++,g=this.getComponent(),h=new AdfTableDataFetchEvent(g,f,b,d,e);h.setPartial(!0);h.setRenderOnly(a);var k=!1;a?AdfPage.PAGE.queueEventToServer(h):(g.queueEvent(h),k=h.isCanceled());k||(this._pendingFetch=b,this._pendingId=f,this._fetchIndex=d,this._fetchKey=e,this._pendingRenderOnly=a);return k?null:h}; AdfDhtmlTableBasePeer.prototype._checkViewportSize=function(a){var b=a.childNodes;0!=b.length&&(b=b[0],void 0!==b.numRows&&(a=Math.round(a.clientHeight/(b.offsetHeight/b.numRows)+0.5),b=this.getComponent(),this._isSyncRows&&b.setProperty("viewportSize",a,!1,AdfUIComponent.PROPAGATE_ALWAYS)))}; AdfDhtmlTableBasePeer.prototype._startFetch=function(a,b,d,e,f){a==this._pendingFetch&&b==this._fetchIndex&&d==this._fetchKey||(e?(e=new Function("var c \x3d arguments.callee;c._self._delayedNavigate(c._sTop, c._subtype, c._index, c._key, c._renderOnly);"),e._sTop=this._currentScrollTop,e._subtype=a,e._index=b,e._key=d,e._renderOnly=f,e._self=this,setTimeout(e,300),this.CancelPendingFetch()):(a=this._queueFetchEvent(f,a,b,d))?(b=AdfPage.PAGE.getLookAndFeel().getTranslatedString("af_table.LABEL_FETCHING"), this.DisplayStatus(b),AdfDhtmlTableBasePeer.SetCursor(this.GetDataBody(),"wait"),this._pruneKeyCache&&(a.setClientTokens(this._collectClientTokens(this._pruneKeyCache)),this._pruneKeyCache=null)):this._undoScroll())};AdfDhtmlTableBasePeer.prototype._delayedNavigate=function(a,b,d,e,f){this._currentScrollTop==a&&this._startFetch(b,d,e,!1,f)};AdfDhtmlTableBasePeer.prototype.CancelPendingFetch=function(){this._pendingRenderOnly=this._pendingId=this._fetchKey=this._fetchIndex=this._pendingFetch=void 0}; AdfDhtmlTableBasePeer.prototype.IsFetchPending=function(){return void 0!=this._pendingFetch};AdfDhtmlTableBasePeer.prototype.isDisclosureFetchPending=function(){return this._pendingFetch==AdfTableDataFetchEvent.EXPAND_SUBTYPE||this._pendingFetch==AdfTableDataFetchEvent.COLLAPSE_SUBTYPE};AdfDhtmlTableBasePeer.prototype._rowIndexToBlock=function(a){for(var b=this.GetDataBody().childNodes,d=0;d=f&&a<=f+e.numRows)return e}return null}; AdfDhtmlTableBasePeer.prototype._splitBlock=function(a,b){AdfAssert.assert(0<=b);AdfAssert.assert(b=b;h--){var k=g[h];e.removeChild(k);f.insertBefore(k,f.firstChild)}e=AdfAgent.AGENT;this._processColGroup()&&(h=AdfDomUtils.getFirstDescendentElement(a,"COLGROUP"))&&d.appendChild(h.cloneNode(!0)); d.appendChild(f);f=d.rows[0].cells;g=g[0].cells;h=f.length;for(k=0;k=b;e--)this._unregisterNode(d[e]),a.deleteRow(e);a.numRows=b;a.cachedHeight=a.offsetHeight}; AdfDhtmlTableBasePeer.prototype._insertBlockDom=function(a,b,d,e,f,g){var h=null;e-=b.startRow;0!=e&&(ethis._canvasHeight)&&(this._canvasHeight=d+b.cachedHeight,this._setFakeCanvasHeight(this._canvasHeight),b=this.getDomElement(),this.SizeDataBody(a,b.clientWidth,b.clientHeight))}; AdfDhtmlTableBasePeer.prototype.SizeDataBody=function(a,b,d){var e=AdfAgent.AGENT,f=this._getScrollbarWidth(),g=this._getScrollbarHeight();b=Math.max(0,b-f);this._scrollbarBehavior==AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR_OVERLAY&&(b+=f);a.style.width=b+"px";d=Math.max(0,d-this._cachedCHHeight-this._cachedCFHeight-this._cachedNBHeight-g);this._checkLoadMore();this._scrollbarBehavior==AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR_OVERLAY&&(d+=g);a.style.height=d+"px";this._headerless||(f=this.__getColumnHeader().style, f.width=a.style.width,0=(this._canvasHeightLimited?AdfDhtmlTableBasePeer._CSS_HEIGHT_LIMIT:this._canvasHeight)-e||this._canvasHeightLimited&& this.GetRowCount()==a.startRow+a.numRows)d=p-e;a.startPos=n-d;a.cachedHeight=p}else{if(b==AdfTableDataFetchEvent.AFTER_KEY_SUBTYPE){var q=l[m-1];if(0==h)if(-1==this.GetRowCount()){var r=f.getIntAttribute(q,"_rowCount",-1);this._rowCount=-1==r?this._knownRowCount:r;0==l[0].startPos&&q.startPos+q.cachedHeight<=this._canvasHeight&&(this._canvasHeight=q.startPos+q.cachedHeight,this._setFakeCanvasHeight(this._canvasHeight))}else this._adjustRowCountFromResponse(k,a);else{a.startPos=q.startPos+q.cachedHeight; k.appendChild(a);a.cachedHeight=a.offsetHeight;var s=g-q.startRow-q.numRows;0!=s&&this.ShiftIndex(q,s,!1);this._adjustRowCountFromResponse(k,a);if(0!=s&&!this.IsReceivingActiveEvents())for(var t=q;t;){var u=t.previousSibling;this._unregisterNode(t);k.removeChild(t);t=u}var v=g+h-this.GetKnownRowCount();if(0a.length)){var b=a[0],d=b.startPos;if(0>d){this._setScrollTop(this._currentScrollTop-b.startPos);for(b=0;bb.length)){var d=b[b.length-1],d=d.startPos+d.cachedHeight-this._canvasHeight;if(-1==this.GetRowCount()||this._canvasHeightLimited&&0>d)d+=AdfDhtmlTableBasePeer._FETCH_MORE_CANVAS_SPACE,this._canvasHeightLimited&&0>d&&(d=0);if(0a&&this._setScrollTop(a))}}; AdfDhtmlTableBasePeer.prototype._processSelectionRequest=function(){var a=this._selectionRequest,b=null;if(null!=a){if(a==AdfDhtmlTableBasePeer._SELECT_PAGE_UP)b=this.GetFirstVisibleRowKeyAndRow();else if(a==AdfDhtmlTableBasePeer._SELECT_PAGE_DOWN)b=this._getLastVisibleRowKeyAndRow();else if(a==AdfDhtmlTableBasePeer._SELECT_ARROW_DOWN||a==AdfDhtmlTableBasePeer._FOCUS_RH_ARROW_DOWN||a==AdfDhtmlTableBasePeer._FOCUS_ROW_ARROW_DOWN)b=this._getNextRowKeyAndRow(this._lastRowKeyInView);else if(a==AdfDhtmlTableBasePeer._SELECT_ARROW_UP|| a==AdfDhtmlTableBasePeer._FOCUS_RH_ARROW_UP||a==AdfDhtmlTableBasePeer._FOCUS_ROW_ARROW_UP)b=this._getPreviousRowKeyAndRow(this._lastRowKeyInView);var d=b.rowKey,b=b.row;null!=d&&(a==AdfDhtmlTableBasePeer._FOCUS_RH_ARROW_UP||a==AdfDhtmlTableBasePeer._FOCUS_RH_ARROW_DOWN?(a=this.GetRowHeaderCellFromRow(b),this.UpdateFocusManager(AdfDhtmlTableBasePeer._ROW_HEADER_FOCUS_TYPE,d,a)):(a!=AdfDhtmlTableBasePeer._FOCUS_ROW_ARROW_UP&&a!=AdfDhtmlTableBasePeer._FOCUS_ROW_ARROW_DOWN&&this._selSelectRow(d,b),this.UpdateFocusManager(AdfDhtmlTableBasePeer._TABLE_BODY_FOCUS_TYPE, d,b)),this._unclipRow(b));delete this._selectionRequest}}; AdfDhtmlTableBasePeer.prototype.DisplayStatus=function(a,b){var d=this._getStatusMessage();if(d){d.innerHTML=a;var e=d.style;if("none"==e.display){e.zIndex=5E3;var f=this.GetDataBody();e.visibility="hidden";e.display="block";var g;g=this._virtInitialized?f.offsetHeight:this.getDomElement().clientHeight-this._cachedCHHeight;e.top=this._cachedCHHeight+Math.floor((g-d.offsetHeight)/2)+"px";g="25px";b&&(g=Math.floor(f.offsetWidth/2-d.offsetWidth/2)+"px");AdfDhtmlTableBasePeer._isRTL()?e.left=g:e.right= g;e.visibility="visible"}}};AdfDhtmlTableBasePeer.prototype._hideStatus=function(){var a=this._getStatusMessage();a&&this._hideElement(a)}; AdfDhtmlTableBasePeer.prototype._hideElement=function(a){var b=AdfAgent.AGENT,d=this.GetScroller(),e=this._hasScroller(d)&&b.getPlatform()==AdfAgent.IE_PLATFORM&&8<=b.getVersion(),f;if(e)if(AdfCollections.isArray(d)){f=[];for(var g=0;gAdfDhtmlTableBasePeer._CSS_HEIGHT_LIMIT?(a=AdfDhtmlTableBasePeer._CSS_HEIGHT_LIMIT,this._canvasHeightLimited=!0):this._canvasHeightLimited=!1;if(this._hasSingleScroller()&&!this._isPaged){var d=b.scrollTop;AdfDhtmlTableBasePeer.FindFirstChildByTagName(b,"DIV").style.height=a+"px";b.scrollTop=d}else d=AdfDhtmlTableBasePeer.FindFirstChildByTagName(b[0],"DIV"),AdfDhtmlTableBasePeer.FindFirstChildByTagName(b[1], "DIV").style.height=d.style.height=a+"px"};AdfDhtmlTableBasePeer.prototype.GetScroller=function(){if(this._hasSingleScroller()&&!this._isPaged)return this.__getElemBySubId("scroller");var a=[];a[AdfDhtmlTableBasePeer._HSCROLLER]=this.__getElemBySubId("hscroller");a[AdfDhtmlTableBasePeer._VSCROLLER]=this.__getElemBySubId("vscroller");return a}; AdfDhtmlTableBasePeer.prototype._scrollerScrollToPos=function(a,b){var d=AdfAgent.getAgent(),e=null!=a&&AdfDhtmlTableBasePeer._isRTL()&&d.getPlatform()==AdfAgent.IE_PLATFORM&&7h+e)&&!this._areAllColumnsFrozen(f[0].cells.length)){for(var k=0;k=k)){var l=f[k],m=this._getNestedScrolledTable(l),n=l.offsetHeight;if(m.offsetHeight!=n){var p=AdfAgent.AGENT,q=p.getPlatform()==AdfAgent.IE_PLATFORM,p=p.getPlatform()==AdfAgent.WEBKIT_PLATFORM; q||p?m.style.height="auto":m.rows[0].style.height="auto";q||p?m.style.height=n+"px":m.rows[0].style.height=n+"px"}if(b+l.offsetTop+n>h+e){a._lastSyncRow=k;return}}a._lastSyncRow=g-1}}}; AdfDhtmlTableBasePeer.prototype._showColumnResizeIndicator=function(a,b){var d=this._getColumnResizeIndicator();if(d){var e=!AdfDhtmlTableBasePeer._isRTL(),d=d.style;d.display="block";d.zIndex=20;d.top="0px";if(e){if(e=a.offsetLeft+a.offsetWidth,this._freezeColumnsToStart()&&!this._isColumnFrozen(b)?e+=this._frozenWidth:this._freezeColumnsToEnd()&&this._isColumnFrozen(b)&&(e+=this._getUnfrozenColumnsWidth()),!this._hasFrozenColumn()||!this._isColumnFrozen(b))e-=this._currentScrollLeft}else if(e=a.offsetLeft, this._freezeColumnsToStart()&&this._isColumnFrozen(b))e+=this.getDomElement().offsetWidth-a.parentNode.parentNode.offsetWidth;else if(this._freezeColumnsToEnd()&&!this._isColumnFrozen(b))e+=this._frozenWidth;else{for(var f=a.parentNode;f&&"TABLE"!=f.tagName;)f=f.parentNode;if(f&&"TABLE"==f.tagName){for(var g=f.offsetWidth,h=f.offsetLeft;f&&"DIV"!=f.tagName;)f=f.parentNode;f&&"DIV"==f.tagName&&f.offsetWidth>g&&(e+=h)}e-=this._getRTLScrollAdjustment();this._getScrollHeight()>this._getScrollerOffsetHeight()&& (e+=this._getVerticalScrollBarWidth())}d.left=e+"px";d.height=this._cachedCHHeight+this._cachedCFHeight+this._cachedNBHeight+this._cachedFMHeight+this.GetDataBody().offsetHeight+"px"}}; AdfDhtmlTableBasePeer.prototype._getColumnHeaderFooterSizingCell=function(a,b,d,e,f){if(!this._hasFrozenColumn()||this._isColumnFrozen(a))return f=AdfDhtmlTableBasePeer.__getChildBySubId(b,d),this._freezeColumnsToEnd()?f.rows[0].cells[a-this._firstFrozen]:f.rows[0].cells[a];b=AdfDhtmlTableBasePeer.__getChildBySubId(b,e);f=AdfDhtmlTableBasePeer.__getChildBySubId(b,f);return this._freezeColumnsToStart()?f.rows[0].cells[a-this._lastFrozen-1]:f.rows[0].cells[a]}; AdfDhtmlTableBasePeer.prototype._getResizedCellInfo=function(a){var b=AdfAgent.AGENT,d=a.cell;AdfDhtmlTableBasePeer._isRTL();var e=b.getIntAttribute(d,"_d_index",-1);"start"==a.data?e--:e+=b.getIntAttribute(d,"colspan",1)-1;a=this._getColumnHeaderFooterSizingCell(e,this.__getColumnHeader(),"t","d2","t2");return b.getAttribute(a,AdfDhtmlTableBasePeer.NO_RESIZE_MARKER,!1)?null:{cell:a,displayIndex:e}}; AdfDhtmlTableBasePeer.prototype._getColumnHeaderLeafCell=function(a){var b=this.__getColumnHeader();if(!b)return null;var d=AdfDhtmlTableBasePeer.__getChildBySubId(b,"t"),e=Array(d);this._hasFrozenColumn()&&(b=AdfDhtmlTableBasePeer.__getChildBySubId(b,"d2"),b=AdfDhtmlTableBasePeer.__getChildBySubId(b,"t2"),e.push(b));for(var b=AdfAgent.AGENT,f=AdfDhtmlTableBasePeer._LEAF_COLUMN,g=null,d=d.rows.length-1;0<=d&&!g;d--)for(var h=0;hp?f.setTableRowHeight(d[k],n):p>n&&f.setTableRowHeight(a[k],p)}else l=a[k].offsetHeight,m=d[k].offsetHeight,l>m?f.setTableRowHeight(d[k],l):m>l&&f.setTableRowHeight(a[k],m);f=Math.max(b.offsetHeight, e.offsetHeight);e.style.height=b.style.height=f+"px";if(g&&2==d.length){for(k=0;kg||0>f&&0l;l++){var m=h.rows[l].cells,n;n=this._freezeColumnsToStart()&&!this._isColumnFrozen(a)? a-d-1:this._freezeColumnsToEnd()&&this._isColumnFrozen(a)?a-e:a;for(var p=0;pf.offsetWidth)e&&(a=f.offsetWidth),b-athis._getScrollerClientWidth()-AdfDhtmlTableBasePeer._AUTOSCROLL_MARGIN&&(k=!0);if(h||k){a-=g;e=AdfDhtmlTableBasePeer._ROOT_COLUMN;k=AdfDhtmlTableBasePeer._ROW_HEADER;for(f=f.rows.length-1;0<=f;f--)for(var l=d.rows[f].cells,m=l.length,n=0;n=q&&b<=r){g=h?Math.max(g-p.offsetWidth,0):Math.min(g+p.offsetWidth,this._getScrollWidth()-this._getScrollerClientWidth());this._scrollerScrollToPos(g,null);break}}}}}};AdfDhtmlTableBasePeer.prototype._handleColReorderDrag=function(a,b,d){this._autoScrollColumnsIfNecessary(a);this._positionColumnReorderTracker(a);this._insertEmptyDropColumn(a)}; AdfDhtmlTableBasePeer.prototype._handleColReorderDrop=function(a,b,d){a=null;null!=this._targetReorderTH&&(a=this._getColReorderAnimationDuration(),this._reorderId=this._reorderTH.id,0b)break;z=z==b}else z=this._freezeColumnsToStart()&&!this._isColumnFrozen(b)?w==b-f-1:this._freezeColumnsToEnd()&&this._isColumnFrozen(b)?w==b-g:w==b;if(z){do null==t?(t=y,v=l.insertRow(q),0==q&&(e.getPlatform()==AdfAgent.IE_PLATFORM&&8>e.getVersion())&& (v.style.position="absolute")):t=r[++w],u+=t.colSpan,s=this._cloneWithSelectedOption(t,!0),e.removeIdsFromDomSubTree(s),v.appendChild(s),v.style.height="auto",0!=q?(s.rowSpan=1,e.setOuterHeight(s,t.offsetHeight)):n+=t.offsetWidth,p.push(t);while(um.offsetHeight)break;var A,B,C=null;this._freezeColumnsToStart()&&!this._isColumnFrozen(d)?(C=this._getNestedScrolledTable(z),A=C.rows[0].cells,B=d-h-1):this._freezeColumnsToEnd()?this._isColumnFrozen(d)?(B=d-k+1,A=z.cells):(C=this._getNestedScrolledTable(z),A=C.rows[0].cells,B=d):(B=d,A=z.cells);if(!this._hasDetailStamp||!f.getAttribute(z,AdfDhtmlTableBasePeer._DETAIL_ROW_MARKER,!1)){var D=b.insertRow(w);w++;for(var G=0;Gm+k.offsetWidth? a=l-(m+k.offsetWidth):(a=-this._getRTLScrollAdjustment(),this._getScrollHeight()>this._getScrollerOffsetHeight()&&(a+=this._getScrollerOffsetWidth()-this._getScrollerClientWidth()))):(d.offsetWidth>h.offsetWidth&&(a=n),d=h)}else this._freezeColumnsToEnd()?f>=k.offsetWidth?(a=k.offsetWidth,a-=this._currentScrollLeft,d=h):d=k:f<=h.offsetWidth?d=h:g?(a=h.offsetWidth,a-=this._currentScrollLeft,d=k):d=h;var p,l=null;if(d){this._hasFrozenColumn()||(a-=b?this._getRTLScrollAdjustment():this._currentScrollLeft); for(var h=h.rows.length,m=AdfDhtmlTableBasePeer._ROOT_COLUMN,n=AdfDhtmlTableBasePeer._ROW_HEADER,q=h-1;0<=q;q--)for(var r=d.rows[q].cells,s=r.length,t=0;t=v&&f<=w-u.offsetWidth/2){l=u;p=-1==u.id.indexOf("_afrBlankColumn");break}else{if(f>=v&&f<=w){l=u;p=!1;break}}else if(f>=v&&f<=w-u.offsetWidth/2){l=u;p=!1;break}else if(f>=v&&f<=w){l=u;p=-1==u.id.indexOf("_afrBlankColumn"); break}}}if(null==l&&null==this._previousInsertColIndex)for(q=h-1;0<=q;q--){var r=d.rows[q].cells,s=r.length,y;0q.offsetHeight)break;if(!this._hasDetailStamp||!d.getAttribute(E,AdfDhtmlTableBasePeer._DETAIL_ROW_MARKER,!1)){var H,I=null;this._freezeColumnsToStart()&&!this._isColumnFrozen(a)?(I=this._getNestedScrolledTable(E),E=I.rows[0],H=E.cells[w-g-1]):this._freezeColumnsToEnd()?this._isColumnFrozen(a)?H=E.cells[w-h+1]:(I=this._getNestedScrolledTable(E),E=I.rows[0],H=E.cells[w]):H=E.cells[w];var J=t.createElement("td"); J.className=u+" "+H.className;k?H.nextSibling?E.insertBefore(J,H.nextSibling):E.appendChild(J):E.insertBefore(J,H);J.style.width=n;J.noWrap=!0;J.innerHTML="\x26nbsp;";m.push(J);null!=I&&(this._adjustReorderInnerTableWidth(I,-l),this._processColGroup()?this._insertEmptyDropColGroupCol(I,a,b,k,l,m):e&&(E=I.parentNode,(f||d.getScrollLeft(E)!=p)&&d.setScrollLeft(E,p)))}}y+=A.offsetHeight;this._processColGroup()&&((!this._hasFrozenColumn()||this._isColumnFrozen(a))&&this._insertEmptyDropColGroupCol(A, a,b,k,l,m,!0),this._hasFrozenColumn()&&!this._isColumnFrozen(a)&&this._adjustReorderNonFrozenCol(A,-l))}f&&!this._hasFrozenColumn()&&d.setScrollLeft(databody,p)}; AdfDhtmlTableBasePeer.prototype._insertEmptyDropColumnFooter=function(a,b){var d=AdfAgent.AGENT,e=d.getPlatform()==AdfAgent.WEBKIT_PLATFORM,f=this._lastFrozen,g=this._firstFrozen,h=this._insertColumnAfter,k=this._reorderColWidth,l=this._emptyDropCells,m=this._reorderEmptyCellWidth,n=this._getColumnFooter(),p,q=null,r=h?a+b-1:a;this._hasFrozenColumn()&&!this._isColumnFrozen(a)?(q=AdfDhtmlTableBasePeer.__getChildBySubId(n,"fd2"),p=AdfDhtmlTableBasePeer.__getChildBySubId(q,"ft2"),this._freezeColumnsToStart()&& (r-=f+1),d.getScrollLeft(q)!=this._currentScrollLeft&&d.setScrollLeft(q,this._currentScrollLeft)):(p=AdfDhtmlTableBasePeer.__getChildBySubId(n,"ft"),this._freezeColumnsToEnd()&&this._isColumnFrozen(a)&&(r-=g));d=n.ownerDocument;for(g=0;2>g;g++)n=p.rows[g],f=d.createElement(0==g?"th":"td"),cell=n.cells[r],h?cell.nextSibling?n.insertBefore(f,cell.nextSibling):n.appendChild(f):n.insertBefore(f,cell),f.style.width=m,0==g?f.style.cssText=cell.style.cssText:(f.className=cell.className,f.innerHTML="\x26nbsp;", f._afrIsFooter=!0,e&&(f.rowSpan="10")),l.push(f);this._adjustReorderColumnHeaderWidths(p,q,a,-k);this._processColGroup()&&this._insertEmptyDropColGroupCol(p,a,b,h,k,l)};AdfDhtmlTableBasePeer._columnReorderAnimationComplete=function(a){a._reorderColumnComponentsWithoutAnimation();a._cleanUpAfterColumnReorder()}; AdfDhtmlTableBasePeer.prototype._handleColReorderAbort=function(){var a=AdfAgent.AGENT;AdfAgent.AGENT.getPlatform();var b=this.__getColumnHeader(),d=AdfDhtmlTableBasePeer.__getChildBySubId(b,"t"),e,f;this._hasFrozenColumn()&&(e=AdfDhtmlTableBasePeer.__getChildBySubId(b,"d2"),f=AdfDhtmlTableBasePeer.__getChildBySubId(e,"t2"));this._removeEmptyDropColumn(f,e);for(var b=a.getIntAttribute(this._reorderTH,"_d_index",-1),g=this._reorderHiddenCells,h=this._reorderColWidth,k=g.length,l,m,n=0;nd.offsetHeight-AdfDhtmlTableBasePeer._AUTOSCROLL_MARGIN,bb&&(a[d]-=1)}; AdfDhtmlTableBasePeer.prototype._selectRowRange=function(a,b){var d=this.GetDataBody();if(null!=d){var e=AdfAgent.getAgent(),f=this.getComponent(),g={},h=1,k=f.getSelectedRowKeys(),l=k[AdfDhtmlTableBasePeer.SELECTALL_KEY_PROPERTY],m=!1,n=!1,d=d.childNodes,p=d.length,q=!0;f.getRowIndex(a)>f.getRowIndex(b)&&(q=!1);for(f=0;fa[0]?1:-1;a=a[0];for(b=b[0];a!=d[0];)this._selectColumn(a,f.findComponent(b)),a+=g,b=this._getColumnHeaderLeafCell(a).id;for(g=0;g=g&&(a.left=d+b+"px")}; AdfDhtmlTableBasePeer.prototype._getLargestMinimumWidth=function(){var a=this._resizedIndex,b=this.__getVisibleLeafColumns()[a],a=this._largestMinimumWidth;if(null==a){var a=0,d=this.__getSelectedColumns();if(-1==AdfCollections.indexOf(d,b))a=b.getMinimumWidth();else for(var b=d.length,e=0;e=this._autoHeightRows&&this._restoreHorizontalScrollBarForIE8(17);a=this._resizeColDelta;b=this._resizedTH;d=parseInt(a)+parseInt(b.style.width);var e=this._getLargestMinimumWidth();d=Math.max(d,e);this._hasFrozenColumn()&&this._isColumnFrozen(this._resizedIndex)&&(e=Math.max(this.GetDataBody().clientWidth-10,e),b.offsetLeft+d>=e&&(d=e-b.offsetLeft)); AdfAssert.assert(!isNaN(d),"Illegal width for column resize drop. delta \x3d "+a+", th.style.width \x3d "+b.style.width);this._doColResizesFromUser(d,null)}; AdfDhtmlTableBasePeer.prototype._restoreHorizontalScrollBarForIE8=function(a){var b=this.GetScroller(),d=AdfAgent.getAgent(),e=d.getPlatform()==AdfAgent.IE_PLATFORM;if(null!=b&&e&&2>this.GetRowCount()){var e=this.getDomElement(),f=this._getScrollbarHeight(),g=this.GetDataBody(),g=!this.IsEmpty?this._computeAutoHeight():g.offsetHeight,h=null,k=0,d=d.getVersion();if(7d){h=b;if(!this._hasSingleScroller()||this._isPaged)h=b[AdfDhtmlTableBasePeer._HSCROLLER];null!=this._averageRowHeight&&(k=this._averageRowHeight, h.style.minHeight=(a?a:8)+k+"px");null!=h&&(a=this._getScrollbarHeight(),f!=a&&(newHeight=g+this._cachedCHHeight+this._cachedCFHeight+a,this._sizeOuterContainer(e,newHeight),this._setScrollerHeight(newHeight,this._cachedCHHeight,this._cachedCFHeight,this._cachedNBHeight)),h.style.minHeight=k+"px")}}}; AdfDhtmlTableBasePeer.prototype._doColResizesFromUser=function(a,b){this._resizedTH=this._largestMinimumWidth=null;var d=this._resizedIndex,e=this.__getVisibleLeafColumns(),f=e.length,g=e[d],h=this.GetDataBody(),k=this.__getSelectedColumns(),l=!1;null==b&&(l=-1!=AdfCollections.indexOf(k,g));var m;this.IsEmpty||(m=h.childNodes[0].rows[0],AdfAssert.assert(null!=m,"this.IsEmpty was "+this.IsEmpty+" but there were no rows!"));var n=[],g=[],p,q=0,r=0,s,t=this._columnStretching;for(s=0;sd&&(q*=-1),q=h-q,r=f.desiredWidth,null!=r&&(q+=r-h),e=Math.max(e,q),e!=q&&(f.atMinimum=!0,l++),k+=e-q,f.desiredWidth=e);p=0}while(0!=k&&lm){p=!0;s=e[k-1].displayIndex+1;var u=s==f.length;for(u&&s--;ss&&(a=s+l,m=s,0>=a))return;e.sort(AdfDhtmlTableBasePeer.__columnSortComparator);for(b=b-l+m;0!=b;){r=[];t=e[0].desiredWidth;for(s=0;st&&r.lengthb/r.length&&(e[k-1].desiredWidth+=b,b=0)}for(s=0;s=l&&(m=0)));if(p&&!u){u=m;for(s=0;s=l)a.newWidth=a.minimumWidth,a.flex=a.newWidth,h[a.displayIndex]=a,this._doResizeColumn(a.displayIndex,null,a.newWidth,p?-l:l,!0),u-=l;else{a.newWidth=a.actualWidth-m;a.flex=a.newWidth;h[a.displayIndex]=a;this._doResizeColumn(a.displayIndex,null,a.newWidth,p?-u:u,!0);break}}p=[];for(s=0;s=l||3200=b)AdfPage.PAGE.addPartialTargets(this.getComponent());else{this._activeDataCount=b;this._payloadEvaluator||(this._payloadEvaluator=new Function("payload","return payload;"));for(var d=this._payloadEvaluator(a),e=0;ea)&&this._processActiveMessage(f)}}}; AdfDhtmlTableBasePeer.prototype.IsInsertAllowed=function(a){var b=!0,d=this.GetDataBody().childNodes,e=d[0],d=d[d.length-1];if(this._pendingFetch==AdfTableDataFetchEvent.AFTER_KEY_SUBTYPE)a==d.startRow+d.numRows&&(b=!1);else if(this._pendingFetch==AdfTableDataFetchEvent.BEFORE_KEY_SUBTYPE)a==e.startRow&&(b=!1);else if(void 0==this._pendingFetch&&a!=d.startRow+d.numRows&&(a=d.startRow+d.numRows))b=!1;return b}; AdfDhtmlTableBasePeer.prototype._findADSInsertLocation=function(a,b,d){var e=-1;if("insertBefore"==b)if(a){if(a=this.FindRowByKey(a))e=a.index}else a=d[d.length-1],b=this.GetRowCount(),-1!=b&&a.startRow+a.numRows==b&&(e=b);else a?(a=this.FindRowByKey(a))&&(e=a.index+1):0==d[0].startRow&&(e=0);return e}; AdfDhtmlTableBasePeer.prototype.InsertClonedRow=function(a,b,d){var e=a.cloneNode(!0);this._cleanClonedRow(e,d);e.setAttribute(AdfDhtmlTableBasePeer._ROW_KEY,d);AdfDomUtils.removeCSSClassName(e,AdfDhtmlTableBasePeer._SELECTED_CLASS);AdfDomUtils.removeCSSClassName(e,AdfDhtmlTableBasePeer._HIGHLIGHTED_CLASS);AdfDomUtils.removeCSSClassName(e,AdfDhtmlTableBasePeer._FOCUSED_CLASS);a=a.parentNode.parentNode.cloneNode(!1);d=this.getDomDocument().createElement("TBODY");d.appendChild(e);a.appendChild(d);this.InsertBlock(a, b,1,1,0);return e};AdfDhtmlTableBasePeer.prototype.InsertClonedComponents=function(a,b){var d=AdfAgent.AGENT.getDescendantComponentsForNode(a);if(d)for(var e=d.length,f=0;f=d?a:b}; AdfDhtmlTableBasePeer.prototype.UpdateActiveRow=function(a){var b="",d=a.type;if(!this.IsEmpty){a=a.updates;for(var e="",f=0;fd)if(d=parseInt(f.style.width),isNaN(d)||0>d)d=100,e=!0}catch(h){d=100,e=!0}e&&AdfLogger.LOGGER.warning("INVALID COLUMN WIDTH FOR COLUMN DISPLAY INDEX: "+a);return d}; AdfDhtmlTableBasePeer.prototype._stretchTheColumns=function(){var a=this._columnStretching;if(!(null==a||"none"==a))if(!(this._nothingFlexible||this.IsEmpty&&this._headerless)){this._stretchingTheColumns=!0;try{this._doColumnStretching(a)}finally{delete this._stretchingTheColumns}}}; AdfDhtmlTableBasePeer.prototype._doColumnStretching=function(a,b){var d,e,f,g,h,k=0,l=this.__getVisibleLeafColumns();e=l.length;f=Array(e);g=Array(e);h=Array(e);for(var m=!0,n=0;nb&&this._doColumnStretching(a,++b))}}; AdfDhtmlTableBasePeer.prototype._stretchLastBlockColumn=function(a){var b;if(-1!=this._lastColWidthOverride){var d=this._colCount-1;AdfAssert.assert(null!=a.rows,"Unable to stretch the columns in the last fetched block because it contains no rows!");b=this.FindCellByIndex(a.rows[0],d);b=parseInt(b.style.width);this._resizeBlockColumn(a,d,this._lastColWidthOverride-b)}else if(null!=this._currentColumnStretchDetails){AdfAssert.assert(null!=a.rows,"Unable to stretch the columns in the last fetched block because it contains no rows!"); for(var d=this._currentColumnStretchDetails,e=d.length,f=0;fd.colSpan;)if(e-=d.colSpan,null!=(d=this._getSiblingDomNode(d,!0)))b=d;return b}; AdfDhtmlTableBasePeer.prototype.__getParentColumn=function(a){AdfAssert.assertPrototype(a,AdfRichColumn);return!this._headerless&&(a=this._resolveImmediateParentColumn(a.getPeer().getDomElement()))?AdfPage.PAGE.findComponent(a.id):null}; AdfDhtmlTableBasePeer.prototype._resolveImmediateParentColumn=function(a){var b=a.parentNode,d,e=null,f=b.parentNode.parentNode.rows,g=f.length,h=AdfAgent.AGENT;a=h.getIntAttribute(a,"_d_index",-1);for(var k=0;k=a){e=l;b=!0;break}}}}return e}; AdfDhtmlTableBasePeer.prototype._resolveImmediateChildColumn=function(a){var b=AdfAgent.AGENT,d=b.getIntAttribute(a,"_d_index",-1),e=a.parentNode,f;a=null;for(var g=e.parentNode.parentNode.rows,h=g.length,k=h-1;0<=k;k--)if(g[k]==e){f=k+1;break}if(fd.clientWidth+d.offsetLeft&&b.setScrollLeft(d,a.offsetWidth+a.offsetLeft+e-d.clientWidth);d.offsetLeft>a.offsetLeft+e&&b.setScrollLeft(d,a.offsetLeft+e)}else b=this.GetDataBody(),a.offsetLeft+a.offsetWidth>b.clientWidth+this.__getScrollLeft()- this._frozenWidth?this._scrollerScrollToPos(a.offsetWidth+a.offsetLeft-b.clientWidth+this._frozenWidth,null):this.__getScrollLeft()>a.offsetLeft&&this._scrollerScrollToPos(a.offsetLeft,null)}; AdfDhtmlTableBasePeer.prototype._handleSelectAllArrow=function(a,b){switch(a){case AdfKeyStroke.ARROWUP_KEY:this._isFilterable()&&this._setFirstColumnHeaderFocus(!1,!0,!0);break;case AdfKeyStroke.ARROWDOWN_KEY:var d=this.GetDataBody().childNodes;if(0b.offsetWidth){var d=AdfAgent.AGENT.getScrollLeft(b)-(a?-1:1)*(b.clientWidth-b.clientWidth/10),d=a?Math.max(d,0):Math.min(d,b.scrollWidth);AdfAgent.AGENT.scrollToPos(b,d)}}; AdfDhtmlTableBasePeer.prototype._handlePageUp=function(a,b,d){if(a)this._hScrollPage(!0);else if(this._virtInitialized){a=this.GetDataBody();var e=this._currentScrollTop-a.offsetHeight;d=e>0-a.offsetHeight;var e=0>e?0:e,f=this.getComponent().getSelectedRowKeys(),g=!1,h;for(h in f){g=!0;break}if(!g||b)d&&this._scrollerScrollToPos(null,e);else if(h=this.GetFirstVisibleRowKeyAndRow(),null!=(b=h.rowKey))h=h.row,f=null!=f[b]&&null==f[AdfDhtmlTableBasePeer.SELECTALL_KEY_PROPERTY],this._selUnselectAll(), d&&f?(this._selectionRequest=AdfDhtmlTableBasePeer._SELECT_PAGE_UP,e=h.offsetTop+h.parentNode.parentNode.startPos-a.offsetHeight,this._scrollerScrollToPos(null,e)):(this._selSelectRow(b,h),this.UpdateFocusManager(AdfDhtmlTableBasePeer._TABLE_BODY_FOCUS_TYPE,b,h),this._unclipRow(h))}}; AdfDhtmlTableBasePeer.prototype._handlePageDown=function(a,b,d){if(a)this._hScrollPage(!1);else if(this._virtInitialized){d=this.GetDataBody();a=this.getComponent().getSelectedRowKeys();var e=!1,f;for(f in a){e=!0;break}if(!e||b)a=this._currentScrollTop+d.offsetHeight,athis._currentScrollTop){k=d.getAttribute(h,AdfDhtmlTableBasePeer._ROW_KEY);b.rowKey=k;b.row=h;break}}return this._cachedFirstVisibleRowKeyAndRow= b}; AdfDhtmlTableBasePeer.prototype.scrollToRowIndex=function(a,b){var d=a*this._averageRowHeight,e=this.getComponent(),f=this.GetFirstVisibleRowKeyAndRow(),e=f.rowKey?e.getRowIndex(f.rowKey):null,g;this._currentScrollTop!=d&&(g=this.scrollToPos(-1,d,!0,!1));e==a||g==AdfDhtmlTableBasePeer.VIEWPORT_SATISFIED?this._callCallbackWithStatus(b,this.SCROLL_SUCCEEDED):(d=this._postEvalCallback,this._callCallbackWithStatus(d,this.SCROLL_CANCELLED),this._postEvalCallback=b,d||AdfPage.PAGE.addEventListener(AdfDomReplacedEvent.EVENT_TYPE,this._domReplacedListener, this))};AdfDhtmlTableBasePeer.prototype._callCallbackWithStatus=function(a,b){if(a){AdfAssert.assertFunction(a);var d={};d.status=b;a(d)}};AdfDhtmlTableBasePeer.prototype._domReplacedListener=function(a){var b=this.getComponent();AdfAssert.assertPrototype(b,AdfUIComponent);b=b.getClientId();a.containsClientId(b)&&(AdfPage.PAGE.removeEventListener(AdfDomReplacedEvent.EVENT_TYPE,this._domReplacedListener,this),a=this._postEvalCallback,this._postEvalCallback=null,this._callCallbackWithStatus(a,this.SCROLL_SUCCEEDED))}; AdfDhtmlTableBasePeer.prototype._getNextRowKeyAndRow=function(a){for(var b=AdfAgent.AGENT,d=this.GetDataBody().childNodes,e=d.length,f={},g=0;gb.offsetHeight&&this._scrollerScrollToPos(null,this._currentScrollTop+(a-b.offsetHeight)))}; AdfDhtmlTableBasePeer.prototype.UpdateFocusManager=function(a,b,d,e){var f=this._focusManager;null!=f.domElement&&this._updateFocusCellStyle(!1);f.objectType=a;f.currency=b;f.domElement=d;this._updateFocusCellStyle(!0);this._disableRowMouseDownCellFocus||(e?this._setActiveDescendant(e,!0):f.domElement&&("TR"==f.domElement.nodeName?this._moveActiveCellToRow(f.domElement):this._setActiveDescendant(f.domElement,!0)))}; AdfDhtmlTableBasePeer.prototype._getLabelText=function(a){for(var b="",d=(a=a.childNodes)?a.length:0,e=0;ea&&(b=d[a]))}return b};AdfDhtmlTableBasePeer.prototype._getLayeredColumnHeaderIds=function(a){var b=this._getColumnHeaderId(a);a=b;if(null!=b)for(b=AdfAgent.AGENT.getElementById(b);b;)if((b=this._resolveImmediateParentColumn(b))&&b.id)a=b.id+" "+a;return a}; AdfDhtmlTableBasePeer.prototype._getRowHeaderIds=function(a){var b="",d=this.getDomElement().id;if(a)for(var e,f=0;e=this.FindCellByIndex(a,f++);)if("rowheader"==e.getAttribute("role")){var g;(g=this._getFirstInputElementInNode(AdfAgent.AGENT,e,!0))&&g.id?e=g.id:(e.id||(e.id=d+":_ariaRHId"+f),e=e.id);b=b+" "+e}return b};AdfDhtmlTableBasePeer.prototype._moveActiveCellToRow=function(a){var b=this._getActiveCellIndex();-1==b&&(b=0);(a=this.FindCellByIndex(a,b))&&this._setActiveDescendant(a,!0)}; AdfDhtmlTableBasePeer.prototype._getTargetCell=function(a){for(var b=this.getDomElement();a&&"TD"!=a.nodeName&&"TH"!=a.nodeName;){if(a==b)return null;a=a.parentNode}return a}; AdfDhtmlTableBasePeer.prototype._setReadOnlyMode=function(a,b,d){this._disableTabStop(a);this._editableTableReadOnlyMode=a;if(d)if(a){var e;a=this.GetRowKeyAndRow(b,this.getDomElement());null!=a&&null!=a[0]&&(e=this._getCellAndIndexForNode(b,a[1]),this._isClickToEdit()&&(this._lastCTEIndex=e.cellIndex),e.cell&&this._setActiveDescendant(e.cell,!1));b=this._getTargetCell(b);this._isFilterCell(b)?this._setHeaderCellFocus(b):this._isClickToEdit()?(this._setActiveRowKey(null),this._grabFocus()):(!e||!e.cell)&& this._grabFocus()}else(e=this._getActiveCellNode())&&this._setFocusOnEditableElementInNode(AdfAgent.AGENT,e)};AdfDhtmlTableBasePeer.prototype._updateFocusCellStyle=function(a){var b=this._focusManager;a&&b.domElement?AdfDomUtils.addCSSClassName(b.domElement,AdfDhtmlTableBasePeer._FOCUSED_CLASS):!a&&b.domElement&&AdfDomUtils.removeCSSClassName(b.domElement,AdfDhtmlTableBasePeer._FOCUSED_CLASS)};AdfDhtmlTableBasePeer.prototype._isFilterable=function(){return null!=this.getDomElement().getAttribute(AdfDhtmlTableBasePeer._FILTERABLE)}; AdfDhtmlTableBasePeer.prototype._isTargetCellFilter=function(a){for(var b=this.getDomElement(),d=AdfAgent.AGENT,e=d.getAttribute(a,AdfDhtmlTableBasePeer._FILTER_COLUMN);null==e;){if(null==a||a==b)return!1;a=a.parentNode;if(null==a||1!=a.nodeType)break;e=d.getAttribute(a,AdfDhtmlTableBasePeer._FILTER_COLUMN)}return null!=e};AdfDhtmlTableBasePeer.prototype._handleFilterCellAction=function(){var a=this.getComponent();a.queueEvent(new AdfQueryEvent(a));a.setSelectedRowKeys(null)}; AdfDhtmlTableBasePeer.prototype.getRowKeyForEvent=function(a){a=a.getNativeEventTarget();if(null==this._getTargetRowHeader(a)){var b=this.getDomElement();a=this.GetRowKeyAndRow(a,b);if(null!=a)return a[0]}return null};AdfDhtmlTableBasePeer.prototype.applyDragReadyStateForRowKeys=function(a,b,d){AdfAssert.assertArray(d);a=this._getDomNodesForDrag(d);b=0;for(d=a.length;bthis._currentScrollTop&&g.offsetTop-(this._currentScrollTop-h)+AdfDhtmlTableBasePeer._MAXIMUM_ROW_REVEAL=f.left&&b>=f.top&&a<=f.right&&b<=f.bottom)){d[AdfStampedDropTarget.ROW_KEY]=e;d[AdfStampedDropTarget.DROP_ORIENTATION]=g;return}this._getRowKeyAndOrientationForPosition(a, b,d)}; AdfDhtmlTableBasePeer.prototype._getRowKeyAndOrientationForPosition=function(a,b,d){AdfAssert.assertNumber(a);AdfAssert.assertNumber(b);var e=this.GetDataBody(),f=AdfDomUtils.getElementAtPoint(e,a,b,null,{colgroup:!0});if(f&&(f=this.GetRowKeyAndRow(f,this.getDomElement()),null!=f)){d[AdfStampedDropTarget.ROW_KEY]=f[0];d[AdfStampedDropTarget.DROP_ORIENTATION]=AdfDropEvent.DROP_ORIENTATION_ON;return}this.IsEmpty?(d[AdfStampedDropTarget.ROW_KEY]=null,d[AdfStampedDropTarget.DROP_ORIENTATION]=AdfDropEvent.DROP_ORIENTATION_AFTER):AdfAgent.AGENT.pointInElementBounds(e, a,b)?(d[AdfStampedDropTarget.ROW_KEY]=this._getLastRowKey(),d[AdfStampedDropTarget.DROP_ORIENTATION]=AdfDropEvent.DROP_ORIENTATION_AFTER):(d[AdfStampedDropTarget.ROW_KEY]=null,d[AdfStampedDropTarget.DROP_ORIENTATION]=AdfDropEvent.DROP_ORIENTATION_ON)}; AdfDhtmlTableBasePeer.prototype.showDragFeedback=function(a,b,d,e,f,g,h){AdfAssert.assertPrototype(a,AdfDnDContext);AdfAssert.assertStringOrNull(b);AdfAssert.assertNumber(d);AdfAssert.assertStringOrNull(e);d==AdfDnDContext.ACTION_NONE&&(AdfDomUtils.removeCSSClassName(this.GetDataBody(),AdfDhtmlTableBasePeer._DROP_TARGET_CLASS),b=null);if(e!=b&&(e&&(a=this.FindRowByKey(e))&&AdfDomUtils.removeCSSClassName(a.tr,AdfDhtmlTableBasePeer._DROP_TARGET_CLASS),b&&(a=this.FindRowByKey(b))))AdfDomUtils.addCSSClassName(a.tr, AdfDhtmlTableBasePeer._DROP_TARGET_CLASS),AdfDomUtils.removeCSSClassName(this.GetDataBody(),AdfDhtmlTableBasePeer._DROP_TARGET_CLASS);null==b&&d!=AdfDnDContext.ACTION_NONE&&AdfDomUtils.addCSSClassName(this.GetDataBody(),AdfDhtmlTableBasePeer._DROP_TARGET_CLASS)};AdfDhtmlTableBasePeer.prototype.getRowKeyBounds=function(a){return!a?null:(a=this.FindRowByKey(a))?AdfAgent.AGENT.getElementPageBounds(a.tr):null}; AdfDhtmlTableBasePeer.prototype.ShiftIndex=function(a,b,d){for(;a;)a.startRow+=b,a=d?a.nextSibling:a.previousSibling};AdfDhtmlTableBasePeer.prototype.IsReceivingActiveEvents=function(){return-1!=this._activeDataCount};AdfDhtmlTableBasePeer.prototype.RemoveAllBlocks=function(a){for(var b=a.childNodes,d=b.length-1;0<=d;d--)this._unregisterNode(b[d]),a.removeChild(b[d])}; AdfDhtmlTableBasePeer.prototype._getFirstRowKey=function(){var a=this.GetDataBody().childNodes;return 0=this._totalWidth&&(e=this._unfrozenWidth);0=h-1;if(!e){for(l++;lf+d.clientWidth&&b.scrollToPos(d,this._currentScrollLeft+(a.offsetWidth+e-(f+d.clientWidth)),null)}}}; AdfDhtmlTableBasePeer.prototype.scrollColumnIntoView=function(a,b){AdfAssert.assert(null!=a||null!=b);var d=AdfAgent.AGENT;if(!b&&(b=d.getElementById(a),!b))return;var e=d.getIntAttribute(b,"_d_index",-1);if(!this._isColumnFrozen(e)){e=this.GetScroller();if(!this._hasSingleScroller()||this._isPaged)e=e[AdfDhtmlTableBasePeer._HSCROLLER];var f=b.offsetLeft;if(f!=this._currentScrollLeft){var g=this._colScrollAnimationDuration;void 0==g&&(g=AdfPage.PAGE,this._colScrollAnimationDuration=g=g.isAnimationEnabled()? parseInt(g.getLookAndFeel().getSkinProperty("af|table-tr-column-scroll-animation-duration")):0);0=h&&a=k&&bf.getVersion()&&this._setFakeCanvasHeight(this._canvasHeight);f=this._getScrollbarHeight();e!=f&&!d&&(e=a+this._cachedCHHeight+this._cachedCFHeight+f,this._sizeOuterContainer(b,e),this._setScrollerHeight(e,this._cachedCHHeight,this._cachedCFHeight,this._cachedNBHeight));this.SizeDataBody(this.GetDataBody(),b.clientWidth, b.clientHeight)}};AdfDhtmlTableBasePeer.prototype._sizeOuterContainer=function(a,b){var d=AdfAgent.AGENT;if("border-box"==d.getBoxSizing(a)){var e=AdfAgent.getCSSLengthAsInt,d=d.getComputedStyle(a);b=b+e(d.paddingTop)+e(d.paddingBottom)+e(d.marginTop)+e(d.marginBottom)+e(d.borderTopWidth)+e(d.borderBottomWidth)}a.style.height=b+"px";a.style.minHeight&&parseFloat(a.style.minHeight)>b&&(a.style.minHeight=b+"px")}; AdfDhtmlTableBasePeer.prototype.AdjustAutoHeight=function(){var a=this.GetPanelCollectionPeer(),b=this.GetDataBody();if(a&&a.isDetached()){var a=this.getDomElement(),d=a.clientHeight;this.__fixPanelCollectionDimensions(!0);this.SizeDataBody(b,a.clientWidth,d);this.IsEmpty||this._setScrollerHeight(d,this._cachedCHHeight,this._cachedCFHeight,this._cachedNBHeight)}else if(this.isHeightAutoSized()&&!this.BusyAnimating()){var d=!this.IsEmpty?this._computeAutoHeight():b.offsetHeight,e=AdfAgent.AGENT,e= e.getPlatform()==AdfAgent.IE_PLATFORM&&9>e.getVersion()&&7this.GetRowCount())this._setOuterHeightForBodyHeight(d),a&&this.__fixPanelCollectionDimensions(!1);this._checkAutoHeightScrollbar(b);!this._stretchingTheColumns&&!this._desendentResizeQueued&&this._doStretch()}}; AdfDhtmlTableBasePeer.prototype._queueDescendantResize=function(){if(!this._desendentResizeQueued){this._desendentResizeQueued=!0;try{AdfPage.PAGE.__queueDescendantResizeNotifySource(this.getComponent()),AdfPage.PAGE.__doDescendantResizeNotify()}finally{delete this._desendentResizeQueued}}};AdfDhtmlTableBasePeer.prototype._doStretch=function(a){a=this._totalWidth;this._stretchTheColumns();this._totalWidth!=a&&this._queueDescendantResize();return-1}; AdfDhtmlTableBasePeer.prototype._checkAutoHeightScrollbar=function(a){var b=a.childNodes,d=this._autoHeightRows,e=b.length,f=this._getRowCountWithDisclosedDetailStampRow(a);this._allRowsAvailableOnClient(b,e)&&f<=d&&(b=this._getScrollerClientHeight(),b!=this._canvasHeight&&(this._canvasHeight=b,this._setFakeCanvasHeight(b),b=this.getDomElement(),this._setScrollerWidth(b.clientWidth,this._frozenWidth),this.SizeDataBody(a,b.clientWidth,b.clientHeight)))}; AdfDhtmlTableBasePeer.prototype._getRowCountWithDisclosedDetailStampRow=function(a){var b=0;if(this._hasDetailStamp){a=a.childNodes;for(var d=a.length,e=0;e=this._cachedNBWidth&&this._nbarMin&&(this._nbarMin=!1,d=!0);if(d){var d=AdfAgent.AGENT,e=this.getComponent().getClientId(),f=AdfRichUIPeer.CreateSubId(e,AdfDhtmlTableBasePeer._NAVBAR_RANGE_TEXT),f=d.getElementById(f),e=AdfRichUIPeer.CreateSubId(e,AdfDhtmlTableBasePeer._NAVBAR_PAGE_CNT),d=d.getElementById(e);this._nbarMin?(d.style.display="none",f.style.display="none"):(d.style.display= "",f.style.display="")}}; AdfDhtmlTableBasePeer.prototype.__handleNavBarItemsClick=function(a,b){var d=!1;if(this._isNavBarLink(b,AdfDhtmlTableBasePeer._NAVBAR_PREVIOUS))-1d)b-=1,a=this._getBlockLastRowKey(a),this._startFetch(AdfTableDataFetchEvent.AFTER_KEY_SUBTYPE,b,a,null,!1)}else a=b[0],b=a.startRow,a=this._getBlockFirstRowKey(a),this._startFetch(AdfTableDataFetchEvent.BEFORE_KEY_SUBTYPE,b,a,null,!1)}; AdfDhtmlTableBasePeer.prototype._updateLoadMoreItemsRangeText=function(a,b,d,e){if(!this._isImplicitLoadMore){var f=AdfPage.PAGE.getLookAndFeel(),g=this.getComponent(),h=this._getLoadMore(e);e=AdfRichUIPeer.CreateSubId(g.getClientId(),e?AdfDhtmlTableBasePeer._LOAD_MORE_RNG_TOP_TEXT:AdfDhtmlTableBasePeer._LOAD_MORE_RNG_BOTTOM_TEXT);a=parseInt(a)+1;h=h.childNodes[0].childNodes;for(g=0;ga.colSpan)a=AdfRichUIPeer.CreateSubId(a.id,AdfDhtmlTableBasePeer.__SORT_INDICATOR),b=b.getElementById(a),null!=b&&(a=b.getAttribute(AdfDhtmlTableBasePeer._SORTED_TYPE),d=b.getAttribute(AdfDhtmlTableBasePeer._SUPPORTS_HOVER), null==a&&d&&(b.style.visibility=""))}}; AdfDhtmlTablePeer.prototype.SetCursorToText=function(a,b,d){var e=this.getComponent().getDragSource();if(("TD"==d||"SPAN"==d||"NOBR"==d)&&null==b.getAttribute(AdfDhtmlTableBasePeer._ROW_HEADER)&&(AdfAgent.AGENT.getPlatform()==AdfAgent.GECKO_PLATFORM||null!=e))if(d=AdfPage.PAGE.getLookAndFeel(),onlyTextNode=this._getOnlyTextNode(b))if((b=onlyTextNode.parentNode)&&"SPAN"==b.nodeName&&b.parentNode&&"A"!=b.parentNode.nodeName)AdfDhtmlTableBasePeer.SetCursor(b,"text"),e&&b.setAttribute(AdfDhtmlTableBasePeer._CELL_TEXT_KEY, "on");else if(b&&"TD"==b.nodeName&&(AdfDomUtils.containsCSSClassName(b,d.getStyleClass(AdfDhtmlTablePeer._COLUMN_DATA_CELL_CLASS))||AdfDomUtils.containsCSSClassName(b,d.getStyleClass(AdfDhtmlTablePeer._COLUMN_BANDED_DATA_CELL_CLASS)))||"NOBR"==b.nodeName)d=a.createElement("span"),d.appendChild(a.createTextNode(onlyTextNode.nodeValue)),AdfDhtmlTableBasePeer.SetCursor(d,"text"),e&&d.setAttribute(AdfDhtmlTableBasePeer._CELL_TEXT_KEY,"on"),null==b.replaceChild(d,onlyTextNode)&&AdfLogger.LOGGER.fine("unable to replace child textnode '", onlyTextNode.nodeValue,"' with a span element '",d,"for the current node ",b)}; AdfDhtmlTablePeer.prototype.HandleComponentMouseOut=function(a){if(!this._resizedTH&&!this._reorderTH){var b=AdfAgent.AGENT;if(this._scrollbarBehavior==AdfDhtmlTableBasePeer._SCROLLBAR_BEHAVIOR_OVERLAY){var d=this.getDomElement(),e=b.getElementById(AdfRichUIPeer.CreateSubId(d.id,AdfDhtmlTableBasePeer._DATAWRAPPER));if(e){var f=!1,g=a.getNativeEvent().clientX,h=a.getNativeEvent().clientY,k,l;this._hasSingleScroller()&&!this._isPaged?(k=this.GetScroller(),l=this.GetScroller()):(k=this.GetScroller()[AdfDhtmlTableBasePeer._VSCROLLER], l=this.GetScroller()[AdfDhtmlTableBasePeer._HSCROLLER]);if(null!=l&&null!=l&&!this._scrollbarHidden){var m=k.offsetWidth-k.clientWidth,n=l.offsetHeight-l.clientHeight,p=e.getBoundingClientRect();g>p.left+1&&(gp.top+1&&ha.colSpan&&this._hideColumnSortableIndicator(b,a)}};